Skip to content

fix labeler

fix labeler #755

name: Comment commands
on:
pull_request:
types: [opened]
issue_comment:
types: [created]
jobs:
check_user_permission:
runs-on: ubuntu-latest
name: A job to check user's permission level
steps:
- name: Check user permission (write)
id: check-write
uses: actions-cool/check-user-permission@v2
with:
require: 'write'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Abort
if: steps.check-write.outputs.check-result == 'false'
run: exit 1
mythx_partial:
needs: [check_user_permission]
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request }}
outputs:
run: ${{ steps.check.outputs.triggered }}
mode: ${{ steps.mode.outputs.mode }}
steps:
- uses: khan/pull-request-comment-trigger@v1.1.0
id: check
with:
trigger: '/mythx partial'
prefix_only: true
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Get mode
id: mode
run: |
mode=$(echo "$BODY" | sed "s|/mythx partial ||" | sed "s/ //")
echo "mode=$mode" >> $GITHUB_OUTPUT
env:
BODY: ${{ github.event.comment.body }}
mythx_partial_run:

Check failure on line 45 in .github/workflows/comment-triggers.yml

View workflow run for this annotation

GitHub Actions / Comment commands

Invalid workflow file

The workflow is not valid. .github/workflows/comment-triggers.yml (Line: 45, Col: 3): Error calling workflow 'aragon/osx/.github/workflows/mythx-changed.yml@7741386fcefd366e4e360150c89e684192e4a1f8'. The nested job 'mythx' is requesting 'actions: read, attestations: read, checks: read, deployments: read, discussions: read, issues: read, models: read, pages: read, pull-requests: read, repository-projects: read, statuses: read, security-events: read, id-token: read', but is only allowed 'actions: none, attestations: none, c[...] .github/workflows/comment-triggers.yml (Line: 45, Col: 3): Error calling workflow 'aragon/osx/.github/workflows/mythx-changed.yml@7741386fcefd366e4e360150c89e684192e4a1f8'. The nested job 'comment' is requesting 'issues: write, pull-requests: write', but is only allowed 'issues: none, pull-requests: none'.
needs: ['mythx_partial']
if: needs.mythx_partial.outputs.run == 'true'
uses: './.github/workflows/mythx-changed.yml'
with:
pr_number: ${{ github.event.issue.number }}
mode: ${{ needs.mythx_partial.outputs.mode }}
secrets: inherit
mythx_full:
needs: [check_user_permission]
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request }}
outputs:
run: ${{ steps.check.outputs.triggered }}
mode: ${{ steps.mode.outputs.mode }}
steps:
- uses: khan/pull-request-comment-trigger@v1.1.0
id: check
with:
trigger: '/mythx full'
prefix_only: true
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Get mode
id: mode
run: |
mode=$(echo "$BODY" | sed "s|/mythx full ||" | sed "s/ //")
echo "mode=$mode" >> $GITHUB_OUTPUT
env:
BODY: ${{ github.event.comment.body }}
mythx_full_run:
needs: ['mythx_full']
if: needs.mythx_full.outputs.run == 'true'
uses: './.github/workflows/mythx-full.yml'
with:
mode: ${{ needs.mythx_full.outputs.mode }}
secrets: inherit
release_label:
needs: [check_user_permission]
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request }}
steps:
- uses: khan/pull-request-comment-trigger@v1.1.0
id: check
with:
trigger: '/release'
prefix_only: true
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Get type
id: type
run: |
type=$(echo "$BODY" | sed "s|/release ||" | sed "s/ //")
echo "type=$type" >> $GITHUB_OUTPUT
env:
BODY: ${{ github.event.comment.body }}
- name: add label
if: steps.check.outputs.triggered == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
labels: release:${{ steps.type.outputs.type }}
subgraph_label:
needs: [check_user_permission]
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request }}
steps:
- uses: khan/pull-request-comment-trigger@v1.1.0
id: check
with:
trigger: '/subgraph'
prefix_only: true
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Get type
id: type
run: |
type=$(echo "$BODY" | sed "s|/subgraph ||" | sed "s/ //")
echo "type=$type" >> $GITHUB_OUTPUT
env:
BODY: ${{ github.event.comment.body }}
- name: add label
if: steps.check.outputs.triggered == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
labels: subgraph:${{ steps.type.outputs.type }}