Skip to content

chore: update readme (github app) #2161

chore: update readme (github app)

chore: update readme (github app) #2161

name: update-pull-request-body
on:
pull_request:
permissions:
pull-requests: write
jobs:
job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: update pull request body
uses: actions/github-script@v7
env:
pr_number: 316
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
debug: true
script: |
contentToAdd = "new"
console.log(contentToAdd);
const pull = await github.rest.issues.get({
issue_number: process.env.pr_number,
owner: context.repo.owner,
repo: context.repo.repo,
});
console.log(pull.data.body);
github.rest.issues.update({
issue_number: process.env.pr_number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${pull.data.body}\n- #${context.issue.number}`
});