On Pull Request #9
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: On Pull Request 1 | |
on: | |
workflow_dispatch: | |
#pull_request: | |
jobs: | |
test_one: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Edit PR description | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
PR_NUMBER="4" | |
# Get the current PR description | |
CURRENT_DESCRIPTION=$(gh pr view $PR_NUMBER --json body -q ".body") | |
# Modify the description. For this example, let's just append some text. | |
NEW_DESCRIPTION="$CURRENT_DESCRIPTION \n\n Edited by GitHub Action." | |
# Update the PR description with the modified content | |
gh pr edit $PR_NUMBER --body "$NEW_DESCRIPTION" |