Module: kamailio Branch: master Commit: 026e90350d0b4ec64695c373b70fa554d9337c34 URL: https://github.com/kamailio/kamailio/commit/026e90350d0b4ec64695c373b70fa554...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2023-11-27T13:53:26+01:00
github: react to PR/issue comments [skip ci]
``/notstale`` will remove ``stale`` label ``/notexpired`` will change the status to ``open``
---
Added: .github/workflows/labels.yml
---
Diff: https://github.com/kamailio/kamailio/commit/026e90350d0b4ec64695c373b70fa554... Patch: https://github.com/kamailio/kamailio/commit/026e90350d0b4ec64695c373b70fa554...
---
diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 00000000000..51aa34a603f --- /dev/null +++ b/.github/workflows/labels.yml @@ -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", + });