|
@@ -0,0 +1,38 @@
|
|
|
+name: manage labels from comments
|
|
|
+
|
|
|
+on: [issue_comment]
|
|
|
+
|
|
|
+jobs:
|
|
|
+ manage:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - uses: actions/github-script@v7
|
|
|
+ if: ${{ contains(github.event.comment.body, '/notstale') }}
|
|
|
+ with:
|
|
|
+ script: |
|
|
|
+ github.rest.issues.removeLabel({
|
|
|
+ context.repo.owner,
|
|
|
+ context.repo.repo,
|
|
|
+ context.issue.number,
|
|
|
+ name,
|
|
|
+ });
|
|
|
+ - uses: actions/github-script@v7
|
|
|
+ if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/notexpired') }}
|
|
|
+ with:
|
|
|
+ script: |
|
|
|
+ github.rest.issues.update({
|
|
|
+ owner: context.repo.owner,
|
|
|
+ repo: context.repo.repo,
|
|
|
+ issue_number: context.issue.number,
|
|
|
+ state: "open",
|
|
|
+ });
|
|
|
+ - uses: actions/github-script@v7
|
|
|
+ if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/notexpired') }}
|
|
|
+ with:
|
|
|
+ script: |
|
|
|
+ github.rest.pulls.update({
|
|
|
+ owner: context.repo.owner,
|
|
|
+ repo: context.repo.repo,
|
|
|
+ pull_number: context.issue.number,
|
|
|
+ state: "open",
|
|
|
+ });
|