diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml index 6fce3e2..07c64ff 100644 --- a/.github/workflows/help-command.yml +++ b/.github/workflows/help-command.yml @@ -10,7 +10,7 @@ on: jobs: create_help_comment_pr: - if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} + if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} runs-on: ubuntu-latest steps: - name: Add comment to PR @@ -39,7 +39,7 @@ jobs: }) create_help_comment_issue: - if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} + if: ${{ !github.event.issue.pull_request && startsWith(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }} runs-on: ubuntu-latest steps: - name: Add comment to Issue diff --git a/.github/workflows/transfer-issue.yml b/.github/workflows/transfer-issue.yml index 06cb1ed..045a621 100644 --- a/.github/workflows/transfer-issue.yml +++ b/.github/workflows/transfer-issue.yml @@ -8,6 +8,9 @@ on: types: - created +permissions: + issues: write + jobs: transfer: if: ${{(!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot') && (startsWith(github.event.comment.body, '/transfer-issue') || startsWith(github.event.comment.body, '/ti'))}} @@ -17,8 +20,9 @@ jobs: uses: actions/checkout@v4 - name: Extract Input id: extract_step + env: + COMMENT: "${{ github.event.comment.body }}" run: | - COMMENT="${{github.event.comment.body}}" REPO=$(echo $COMMENT | awk '{print $2}') echo repo=$REPO >> $GITHUB_OUTPUT - name: Check Repo @@ -53,5 +57,5 @@ jobs: run: | gh issue transfer ${{github.event.issue.number}} asyncapi/${{steps.extract_step.outputs.repo}} env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}