Download wp-calypso/.github/workflows/apply-stale-closure-label.yml from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/.github/workflows/apply-stale-closure-label.yml
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/.github/workflows/apply-stale-closure-label.yml
-
curl -L -o apply-stale-closure-label.yml https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/.github/workflows/apply-stale-closure-label.yml
1.12 kB
| name: Add [Closed] Stale label to closed issues | |
| on: | |
| issues: | |
| types: closed | |
| jobs: | |
| add_label: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v2 | |
| - name: Get all comments on issue | |
| uses: octokit/request-action@v2.x | |
| id: get_all_comments | |
| with: | |
| route: GET /repos/${{github.repository}}/issues/${{ github.event.issue.number }}/comments | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Identify last comment | |
| id: get_last_comment | |
| env: | |
| COMMENTS_OUTPUT: ${{ steps.get_all_comments.outputs.data }} | |
| run: | | |
| last_comment=$( echo "$COMMENTS_OUTPUT" | tr -d '[:cntrl:]' | jq -r '.[-1].body' ) | |
| echo comment=$last_comment >> $GITHUB_OUTPUT | |
| - name: Add [Closed] Stale label | |
| id: add_closed_stale_label | |
| uses: actions-ecosystem/action-add-labels@v1 | |
| if: contains( steps.get_last_comment.outputs.comment, 'Since this issue has been inactive for quite some time, it has now been closed.' ) | |
| with: | |
| labels: "[Closed] Stale" | |