add push event to test #1
Workflow file for this run
This file contains hidden or 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: Missing Documentation Reminder | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: | |
| - edited | |
| - closed | |
| push: | |
| branches: | |
| - "**" | |
| jobs: | |
| find-missing-documentation: | |
| permissions: | |
| contents: read | |
| issues: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Find closed PRs with 'needs documentation' label | |
| uses: actions/github-script@v6 | |
| id: find-prs | |
| with: | |
| script: | | |
| const { data: pullRequests } = await github.pulls.list({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| state: 'closed', | |
| labels: 'needs documentation' | |
| }); | |
| const prsNeedingDocs = pullRequests.filter(pr => pr.labels.some(label => label.name === 'needs documentation')); | |
| return prsNeedingDocs.map(pr => `- ${pr.html_url} by @${pr.user.login}`).join("\n"); | |
| - name: Update Issue Body | |
| uses: julien-deramond/update-issue-body@v1 | |
| with: | |
| issue-number: 255 | |
| body: | | |
| The following PRs have been closed but still need updates in the book: | |
| ${{ steps.find-prs.outputs.result }} | |
| edit-mode: replace |