Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

nuisance commit

nuisance commit #2

Workflow file for this run

on:
pull_request:
types: [opened, reopened]
jobs:
autoclose:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Comment and close PR
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = context.payload.pull_request;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
body: `${context.repo.repo} does not accept pull requests.`
});
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
state: "closed"
});