Label or Block PR Based on Code
Add Label or Block the Pull Request Based on Code
# Add label based on changes in the code environment parameters
workflows:
- name: critical
run:
if: $hasCodePattern("ENV_*")
then: $addLabel("critical")
# Block PR based on changes in the code that includes GitHub Secret
- name: security
run:
if: $hasCodePattern("gh_*")
then: $failCheckStatus("Patch includes a GitHub token")