Seems that labeler does not work properly with comments, tested on my own
local repository.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
+++ /dev/null
-backport:
- - '(Mergifyio backport )'
+++ /dev/null
-name: Labeler
-
-on:
- pull_request_target:
- types:
- - opened
- - reopened
-
-jobs:
- labeler:
- runs-on: ubuntu-latest
- permissions:
- contents: read
- pull-requests: write
- steps:
- - uses: github/issue-labeler@v2.5
- with:
- repo-token: "${{ secrets.GITHUB_TOKEN }}"
- configuration-path: .github/labeler.yml
- enable-versioned-regex: 0
--- /dev/null
+name: Mergifyio backport
+
+on: [issue_comment]
+
+jobs:
+ mergifyio_backport:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: actions-ecosystem/action-regex-match@v2
+ id: regex-match
+ with:
+ text: ${{ github.event.comment.body }}
+ regex: '[Mm]ergifyio backport '
+
+ - uses: actions-ecosystem/action-add-labels@v1
+ if: ${{ steps.regex-match.outputs.match != '' }}
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ labels: backport