File: error-deltas-watchdog.yaml

package info (click to toggle)
node-typescript 5.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 497,496 kB
  • sloc: javascript: 2,107,274; makefile: 6; sh: 1
file content (45 lines) | stat: -rw-r--r-- 2,268 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: "typescript-error-deltas Watchdog"

on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * 3' # Every Wednesday

permissions:
  contents: read

# Ensure scripts are run with pipefail. See:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
defaults:
  run:
    shell: bash

jobs:
  check-for-recent:
    runs-on: ubuntu-latest
    if: github.repository == 'microsoft/TypeScript'
    permissions:
      contents: read # Apparently required to create issues
      issues: write
    env:
      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      TAGS: "@navya9singh @RyanCavanaugh @DanielRosenwasser"
    steps:
    - name: NewErrors
      run: | # --json and --jq prints exactly one issue number per line of output
        DATE=$(date --date="7 days ago" --iso-8601)
        gh issue list --repo microsoft/typescript --search "[NewErrors] created:>=$DATE" --state all --json number --jq ".[].number" \
        | grep -qe "[0-9]" \
        || 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)."
    - name: ServerErrors TS
      run: |
        DATE=$(date --date="7 days ago" --iso-8601)
        gh issue list --repo microsoft/typescript --search "[ServerErrors][TypeScript] created:>=$DATE" --state all --json number --jq ".[].number" \
        | grep -qe "[0-9]" \
        || 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)."
    - name: ServerErrors JS
      run: |
        DATE=$(date --date="7 days ago" --iso-8601)
        gh issue list --repo microsoft/typescript --search "[ServerErrors][JavaScript] created:>=$DATE" --state all --json number --jq ".[].number" \
        | grep -qe "[0-9]" \
        || 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)."