mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-17 23:13:55 +01:00
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
name: Feature Issue Check
|
|
|
|
on:
|
|
issues:
|
|
types: [ opened ]
|
|
|
|
jobs:
|
|
auto-close:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
issues: write
|
|
|
|
steps:
|
|
- name: Check and close feature issues
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const issue = context.payload.issue;
|
|
|
|
if (issue.title.startsWith('[FEAT]: ')) {
|
|
const message = `
|
|
Feature requests on this repository are only open to current [GitHub sponsors](https://github.com/sponsors/LGUG2Z) on the $5/month tier and above, people with a valid [individual commercial use license](https://lgug2z.com/software/komorebi), and approved contributors.
|
|
|
|
This issue has been automatically closed until one of those pre-requisites can be validated.
|
|
`.replace(/^\s+/gm, '');
|
|
|
|
await github.rest.issues.createComment({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: issue.number,
|
|
body: message,
|
|
});
|
|
|
|
await github.rest.issues.update({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: issue.number,
|
|
state: 'closed'
|
|
});
|
|
|
|
await github.rest.issues.lock({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: issue.number,
|
|
state: 'resolved'
|
|
});
|
|
} |