diff --git a/.github/workflows/label-triggers.yml b/.github/workflows/label-triggers.yml new file mode 100644 index 000000000..0449fa2ad --- /dev/null +++ b/.github/workflows/label-triggers.yml @@ -0,0 +1,22 @@ +name: Label-based Triggers +on: + pull_request_target: + types: + - labeled + +jobs: + comment_on_breaking_change: + runs-on: ubuntu-latest + steps: + - name: Check if 'breaking change' label is added + if: github.event.label.name == 'breaking-change' + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '@opentensor/cerebrum breaking change detected! Please review the changes + and prepare accordingly!' + })