Skip to content

build(deps): bump actions/download-artifact from 6 to 8 #40

build(deps): bump actions/download-artifact from 6 to 8

build(deps): bump actions/download-artifact from 6 to 8 #40

Workflow file for this run

name: pr body
on:
pull_request_target:
types:
- opened
- edited
- reopened
permissions:
contents: read
pull-requests: write
jobs:
clean:
name: clean
runs-on: ubuntu-latest
steps:
- name: token
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ secrets.CURSOR_BOT_CLIENT_ID }}
private-key: ${{ secrets.CURSOR_BOT_PRIVATE_KEY }}
permission-contents: read
permission-pull-requests: write
- name: body
uses: actions/github-script@v9
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const body = context.payload.pull_request.body || "";
if (!body.includes("\\n")) {
return;
}
const next = body.replace(/\\n/g, "\n").trimEnd();
if (next === body) {
return;
}
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
body: next,
});