name: Redirect issues to Processing 4
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
redirect:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v9
with:
script: |
const body = `> Thanks for your report. Please note that this repository is inactive and only kept for legacy purposes.
>
> If you're reporting a bug or requesting a feature for Processing 4, please open an issue in **https://github.com/processing/processing4/issues/new/choose** instead.
>
> This issue will be closed automatically.`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body
});
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
state: "closed",
state_reason: "not_planned"
});