Kuma/.github/workflows/pr-reply.yml
Louis Lam 92f2484a8d
Some checks are pending
Auto Test / auto-test (18, ARM64) (push) Blocked by required conditions
Auto Test / auto-test (18, macos-latest) (push) Blocked by required conditions
Auto Test / auto-test (18, ubuntu-latest) (push) Blocked by required conditions
Auto Test / auto-test (18, windows-latest) (push) Blocked by required conditions
Auto Test / auto-test (20, ARM64) (push) Blocked by required conditions
Auto Test / auto-test (20, macos-latest) (push) Blocked by required conditions
Auto Test / auto-test (20, ubuntu-latest) (push) Blocked by required conditions
Auto Test / auto-test (20, windows-latest) (push) Blocked by required conditions
Auto Test / armv7-simple-test (18, ARMv7) (push) Waiting to run
Auto Test / armv7-simple-test (20, ARMv7) (push) Waiting to run
Auto Test / check-linters (push) Waiting to run
Auto Test / e2e-test (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
validate / json-yaml-validate (push) Waiting to run
validate / validate (push) Waiting to run
Auto reply to PRs (#5943)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2025-06-23 17:56:39 +08:00

30 lines
1.3 KiB
YAML

# Replys a message to all new PRs
# The message:
# - Say hello and thanks to the contributor
# - Mention maintainers will review the PR soon
# - To other people, show the testing pr command: npx kuma-pr <username:branch>
# - Also show the advanced usage link: https://github.com/louislam/uptime-kuma/wiki/Test-Pull-Requests
name: Reply to PRs
on:
pull_request:
types: [opened, reopened]
jobs:
reply:
runs-on: ubuntu-latest
steps:
- name: Reply to PR
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
const message = `Hello @${pr.user.login}, thank you for your contribution! :tada:\n` +
`The maintainers will review your PR soon.\n\n` +
`If anyone would like to help test this PR, you can use the command:\n` +
`\`\`\`bash\nnpx kuma-pr ${pr.user.login}:${pr.head.ref}\n\`\`\`\n\n` +
`<sub> For advanced usage, please refer to our [wiki](https://github.com/louislam/uptime-kuma/wiki/Test-Pull-Requests) </sub>`;
await github.rest.issues.createComment({
issue_number: pr.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: message
});