Report remaining open issues #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |