chore(repo): fix issue delta collection (#15936)

This commit is contained in:
Craigory Coppola 2023-03-28 15:58:57 -04:00 committed by GitHub
parent 091978bca5
commit 814f5b13e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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,