diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 489dd25..ae4af96 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,20 @@ jobs: name: Setup runs-on: ubuntu-latest timeout-minutes: 5 + permissions: + pull-requests: write outputs: markdown: ${{ steps.filter.outputs.markdown }} if: ${{ !github.event.pull_request.draft }} steps: + - name: Assign yourself to this PR + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.pull_request.number }} + ASSIGNEE: ${{ github.event.pull_request.user.login }} + if: ${{ github.event.pull_request.user.type != 'Bot' && toJSON(github.event.pull_request.assignees) == '[]' }} + run: gh pr edit $NUMBER --add-assignee $ASSIGNEE - name: Checkout Repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Check diff targets by path filters @@ -38,19 +48,9 @@ jobs: name: Markdown lint runs-on: ubuntu-latest timeout-minutes: 5 - permissions: - pull-requests: write needs: [setup] if: ${{ needs.setup.outputs.markdown == 'true' }} steps: - - name: Assign yourself to this PR - env: - GH_TOKEN: ${{ github.token }} - GH_REPO: ${{ github.repository }} - NUMBER: ${{ github.event.pull_request.number }} - ASSIGNEE: ${{ github.event.pull_request.user.login }} - if: ${{ github.event.pull_request.user.type != 'Bot' && toJSON(github.event.pull_request.assignees) == '[]' }} - run: gh pr edit $NUMBER --add-assignee $ASSIGNEE - name: Checkout Repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: