Skip to content

Commit

Permalink
feat: 添加 pr 和 issue 关联自动化 action #7
Browse files Browse the repository at this point in the history
  • Loading branch information
normal-wls committed Sep 9, 2024
1 parent 73d5bbf commit cf7e9d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/pr-issue_management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
manage-pr-and-issue:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Extract issue ID and link PR to issue
if: github.event.action == 'opened' || github.event.action == 'reopened'
Expand All @@ -19,7 +22,7 @@ jobs:
gh issue edit $ISSUE_ID --add-label "for_test"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set 'done' label when PR is merged
if: github.event.pull_request.merged == true
Expand All @@ -30,4 +33,4 @@ jobs:
gh issue edit $ISSUE_ID --add-label "done"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cf7e9d1

Please sign in to comment.