Getting "This page could not be found. Try searching posts using the search field." when trying to preview an unpublished post #3825
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: 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/[email protected] | |
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" |