|
1 | | -name: 'typescript-error-deltas Watchdog' |
2 | | - |
3 | | -on: |
4 | | - workflow_dispatch: |
5 | | - schedule: |
6 | | - - cron: '0 0 * * 3' # Every Wednesday |
7 | | - |
8 | | -permissions: |
9 | | - contents: read |
10 | | - |
11 | | -# Ensure scripts are run with pipefail. See: |
12 | | -# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference |
13 | | -defaults: |
14 | | - run: |
15 | | - shell: bash |
16 | | - |
17 | | -jobs: |
18 | | - check-for-recent: |
19 | | - runs-on: ubuntu-latest |
20 | | - if: github.repository == 'microsoft/TypeScript' |
21 | | - permissions: |
22 | | - contents: read # Apparently required to create issues |
23 | | - issues: write |
24 | | - env: |
25 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
26 | | - TAGS: '@navya9singh @RyanCavanaugh @DanielRosenwasser' |
27 | | - steps: |
28 | | - - name: NewErrors |
29 | | - run: | # --json and --jq prints exactly one issue number per line of output |
30 | | - DATE=$(date --date="7 days ago" --iso-8601) |
31 | | - gh issue list --repo microsoft/typescript --search "[NewErrors] created:>=$DATE" --state all --json number --jq ".[].number" \ |
32 | | - | grep -qe "[0-9]" \ |
33 | | - || gh issue create --repo ${{ github.repository }} --title "No NewErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=48)." |
34 | | - - name: ServerErrors TS |
35 | | - run: | |
36 | | - DATE=$(date --date="7 days ago" --iso-8601) |
37 | | - gh issue list --repo microsoft/typescript --search "[ServerErrors][TypeScript] created:>=$DATE" --state all --json number --jq ".[].number" \ |
38 | | - | grep -qe "[0-9]" \ |
39 | | - || gh issue create --repo ${{ github.repository }} --title "No TypeScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=59)." |
40 | | - - name: ServerErrors JS |
41 | | - run: | |
42 | | - DATE=$(date --date="7 days ago" --iso-8601) |
43 | | - gh issue list --repo microsoft/typescript --search "[ServerErrors][JavaScript] created:>=$DATE" --state all --json number --jq ".[].number" \ |
44 | | - | grep -qe "[0-9]" \ |
45 | | - || gh issue create --repo ${{ github.repository }} --title "No JavaScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=58)." |
| 1 | +name: 'typescript-error-deltas Watchdog' |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: '0 0 * * 3' # Every Wednesday |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + |
| 11 | +# Ensure scripts are run with pipefail. See: |
| 12 | +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference |
| 13 | +defaults: |
| 14 | + run: |
| 15 | + shell: bash |
| 16 | + |
| 17 | +jobs: |
| 18 | + check-for-recent: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + if: github.repository == 'microsoft/TypeScript' |
| 21 | + permissions: |
| 22 | + contents: read # Apparently required to create issues |
| 23 | + issues: write |
| 24 | + env: |
| 25 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 26 | + TAGS: '@navya9singh @RyanCavanaugh @DanielRosenwasser' |
| 27 | + steps: |
| 28 | + - name: NewErrors |
| 29 | + run: | # --json and --jq prints exactly one issue number per line of output |
| 30 | + DATE=$(date --date="7 days ago" --iso-8601) |
| 31 | + gh issue list --repo microsoft/typescript --search "[NewErrors] created:>=$DATE" --state all --json number --jq ".[].number" \ |
| 32 | + | grep -qe "[0-9]" \ |
| 33 | + || gh issue create --repo ${{ github.repository }} --title "No NewErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=48)." |
| 34 | + - name: ServerErrors TS |
| 35 | + run: | |
| 36 | + DATE=$(date --date="7 days ago" --iso-8601) |
| 37 | + gh issue list --repo microsoft/typescript --search "[ServerErrors][TypeScript] created:>=$DATE" --state all --json number --jq ".[].number" \ |
| 38 | + | grep -qe "[0-9]" \ |
| 39 | + || gh issue create --repo ${{ github.repository }} --title "No TypeScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=59)." |
| 40 | + - name: ServerErrors JS |
| 41 | + run: | |
| 42 | + DATE=$(date --date="7 days ago" --iso-8601) |
| 43 | + gh issue list --repo microsoft/typescript --search "[ServerErrors][JavaScript] created:>=$DATE" --state all --json number --jq ".[].number" \ |
| 44 | + | grep -qe "[0-9]" \ |
| 45 | + || gh issue create --repo ${{ github.repository }} --title "No JavaScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=58)." |
0 commit comments