chore(repo): fix issue delta collection (#15936)
This commit is contained in:
parent
091978bca5
commit
814f5b13e8
3
.github/workflows/issue-notifier.yml
vendored
3
.github/workflows/issue-notifier.yml
vendored
@ -42,7 +42,8 @@ jobs:
|
|||||||
uses: dawidd6/action-download-artifact@v2 # Needed since we are downloading artifact from a different workflow run, official actions/download-artifact doesn't support this.
|
uses: dawidd6/action-download-artifact@v2 # Needed since we are downloading artifact from a different workflow run, official actions/download-artifact doesn't support this.
|
||||||
with:
|
with:
|
||||||
name: cached-issue-data
|
name: cached-issue-data
|
||||||
path: ./scripts/isses-scraper/cached
|
path: ${{ github.workspace }}/scripts/issues-scraper/cached
|
||||||
|
search_artifacts: true
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Collect Issue Data
|
- name: Collect Issue Data
|
||||||
|
|||||||
3
.github/workflows/lock-threads.yml
vendored
3
.github/workflows/lock-threads.yml
vendored
@ -2,7 +2,7 @@ name: "Lock Threads"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 * * * *" # Once a day, at midnight UTC
|
- cron: "0 0 * * *" # Once a day, at midnight UTC
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@ -18,6 +18,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v4
|
- uses: dessant/lock-threads@v4
|
||||||
|
id: lockthreads
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
issue-inactive-days: "30" # Lock issues after 30 days of being closed
|
issue-inactive-days: "30" # Lock issues after 30 days of being closed
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { getScopeLabels, scrapeIssues } from './scrape-issues';
|
|||||||
import { formatGhReport, getSlackMessageJson } from './format-slack-message';
|
import { formatGhReport, getSlackMessageJson } from './format-slack-message';
|
||||||
import { setOutput } from '@actions/core';
|
import { setOutput } from '@actions/core';
|
||||||
import isCI from 'is-ci';
|
import isCI from 'is-ci';
|
||||||
|
import { readdirSync } from 'fs';
|
||||||
|
|
||||||
const CACHE_FILE = join(__dirname, 'cached', 'data.json');
|
const CACHE_FILE = join(__dirname, 'cached', 'data.json');
|
||||||
|
|
||||||
@ -56,8 +57,10 @@ function saveCacheData(report: ReportData) {
|
|||||||
|
|
||||||
function getOldData(): ReportData {
|
function getOldData(): ReportData {
|
||||||
try {
|
try {
|
||||||
|
console.log('DIR CONTENTS:', readdirSync(dirname(CACHE_FILE)));
|
||||||
return readJsonSync(CACHE_FILE);
|
return readJsonSync(CACHE_FILE);
|
||||||
} catch {
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
return {
|
return {
|
||||||
scopes: {},
|
scopes: {},
|
||||||
totalBugCount: 0,
|
totalBugCount: 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user