summaryrefslogtreecommitdiff
path: root/source/features/github-actions-indicators.tsx
diff options
context:
space:
mode:
authorGravatar Federico Brigante <me@fregante.com> 2023-03-01 17:43:44 +0800
committerGravatar GitHub <noreply@github.com> 2023-03-01 09:43:44 +0000
commit3044b1d02343c3cdb29fa27b3b2bc7e82176d222 (patch)
treed069b60a8cee97f1a552fbd49d52386d7ed88c8c /source/features/github-actions-indicators.tsx
parent65ed2f6e23ec56ad6f0ee865ae9de79f98b4554a (diff)
downloadrefined-github-3044b1d02343c3cdb29fa27b3b2bc7e82176d222.tar.gz
refined-github-3044b1d02343c3cdb29fa27b3b2bc7e82176d222.tar.zst
refined-github-3044b1d02343c3cdb29fa27b3b2bc7e82176d222.zip
Meta: Update `webext-storage-cache` (#6376)
Diffstat (limited to 'source/features/github-actions-indicators.tsx')
-rw-r--r--source/features/github-actions-indicators.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/features/github-actions-indicators.tsx b/source/features/github-actions-indicators.tsx
index 8f0db3ea..93467b03 100644
--- a/source/features/github-actions-indicators.tsx
+++ b/source/features/github-actions-indicators.tsx
@@ -7,7 +7,7 @@ import * as pageDetect from 'github-url-detection';
import features from '../feature-manager';
import * as api from '../github-helpers/api';
-import {getRepo} from '../github-helpers';
+import {cacheByRepo} from '../github-helpers';
import observe from '../helpers/selector-observer';
type WorkflowDetails = {
@@ -25,7 +25,7 @@ function addTooltip(element: HTMLElement, tooltip: string): void {
}
}
-const getWorkflowsDetails = cache.function(async (): Promise<Record<string, WorkflowDetails> | false> => {
+const getWorkflowsDetails = cache.function('workflows', async (): Promise<Record<string, WorkflowDetails> | false> => {
const {repository: {workflowFiles}} = await api.v4(`
repository() {
workflowFiles: object(expression: "HEAD:.github/workflows") {
@@ -62,7 +62,7 @@ const getWorkflowsDetails = cache.function(async (): Promise<Record<string, Work
}, {
maxAge: {days: 1},
staleWhileRevalidate: {days: 10},
- cacheKey: () => 'workflows:' + getRepo()!.nameWithOwner,
+ cacheKey: cacheByRepo,
});
async function addIndicators(workflowListItem: HTMLAnchorElement): Promise<void> {