feat: filters save in local storage #8
Workflow file for this run
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: Close Issue on PR Merge | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
close-issue: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Check for issue reference | |
run: | | |
ISSUE_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -oP '(?<=#)\d+') | |
echo "Issue number: $ISSUE_NUMBER" | |
if [ -n "$ISSUE_NUMBER" ]; then | |
echo "Closing issue #$ISSUE_NUMBER" | |
curl -X PATCH \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github+json" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUMBER \ | |
-d '{"state":"closed"}' | |
else | |
echo "No issue referenced in the PR description" | |
fi |