Skip to content

On Pull Request

On Pull Request #9

Workflow file for this run

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"