From 3f0b4b8b35b69d818c13651eb473401ac36843dd Mon Sep 17 00:00:00 2001 From: Fran Mulero Date: Wed, 29 Mar 2023 09:24:34 +0200 Subject: [PATCH] [bitnami/charts] Prevent card self assignment (#15770) Signed-off-by: Fran Mulero --- .github/workflows/moving-cards.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/moving-cards.yml b/.github/workflows/moving-cards.yml index aef3f40887..a4171daf97 100644 --- a/.github/workflows/moving-cards.yml +++ b/.github/workflows/moving-cards.yml @@ -109,9 +109,8 @@ jobs: runs-on: ubuntu-latest needs: - get-issue - # The job shouldn't run for solved cards or new PRs created by bitnami-bot - if: | - (github.event.action != 'created' || needs.get-issue.outputs.type != 'pull_request' || needs.get-issue.outputs.author != 'bitnami-bot') + # The job shouldn't run for solved cards + if: ${{ github.event.project_card.column_id != env.SOLVED_COLUMN_ID }} steps: - name: Repo checkout uses: actions/checkout@v3 @@ -123,21 +122,23 @@ jobs: path: .github/workflows/ - name: Assign to a person to work on it # Assign when there is nobody assigned or the card is new - if: ${{ github.event.project_card.column_id != env.SOLVED_COLUMN_ID && (needs.get-issue.outputs.assignees == '[]' || github.event.action == 'created') }} - uses: pozil/auto-assign-issue@v1.9.0 + if: ${{ needs.get-issue.outputs.assignees == '[]' || github.event.action == 'created' }} + uses: pozil/auto-assign-issue@v1.11.0 with: numOfAssignee: 1 teams: ${{ github.event.project_card.column_id == env.BITNAMI_COLUMN_ID && env.SUPPORT_TEAM_NAME || (github.event.project_card.column_id == env.BUILD_MAINTENANCE_COLUMN_ID && env.BUILD_MAINTAINERS_TEAM_NAME || env.TRIAGE_TEAM_NAME) }} repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }} + allowSelfAssign: false - name: Reassign when moved into 'In progress' from 'Triage' # Reassigned when moved into In progress FROM Triage if: | github.event.action == 'moved' && needs.get-issue.outputs.assignees != '[]' && github.event.project_card.column_id == env.IN_PROGRESS_COLUMN_ID && github.event.changes.column_id.from == env.TRIAGE_COLUMN_ID - uses: pozil/auto-assign-issue@v1.9.0 + uses: pozil/auto-assign-issue@v1.11.0 with: numOfAssignee: 1 removePreviousAssignees: true teams: ${{ env.SUPPORT_TEAM_NAME }} - repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }} \ No newline at end of file + repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }} + allowSelfAssign: false \ No newline at end of file