Skip to content

Report remaining open issues #90

Report remaining open issues

Report remaining open issues #90

name: Report remaining open issues
on:
schedule:
# Daily at 8:20 UTC
- cron: '20 8 * * *'
jobs:
track_pr:
runs-on: ubuntu-latest
steps:
- run: |
numOpenIssues="$(gh api graphql -F owner=$OWNER -F name=$REPO -f query='
query($name: String!, $owner: String!) {
repository(owner: $owner, name: $name) {
issues(states:OPEN){
totalCount
}
}
}
' --jq '.data.repository.issues.totalCount')"
echo 'NUM_OPEN_ISSUES='$numOpenIssues >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
- run: |
gh issue create --title "Issue report" --body "$NUM_OPEN_ISSUES issues remaining" --repo $GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}