mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-16 22:00:35 -04:00
27 lines
1.1 KiB
YAML
27 lines
1.1 KiB
YAML
name: GitHub - Spam PR
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- labeled
|
|
|
|
jobs:
|
|
is-spam:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
|
|
with:
|
|
github-token: ${{secrets.CAMPERBOT_NO_TRANSLATE}}
|
|
script: |
|
|
if (context.payload.label.name === "spam") {
|
|
try {
|
|
await github.rest.issues.createComment({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
body: "We are marking this pull request as spam. Please note that if you are participating in Hacktoberfest, two or more PRs marked as spam will result in your permanent disqualification.\n\nIf you are interested in making quality and genuine contributions to our projects, check out our [contributing guidelines](https://contribute.freecodecamp.org)."
|
|
});
|
|
} catch {
|
|
// Conversation may already be locked — ignore.
|
|
}
|
|
}
|