diff --git a/.github/workflows/.env b/.github/workflows/.env deleted file mode 100644 index e79b37f..0000000 --- a/.github/workflows/.env +++ /dev/null @@ -1,9 +0,0 @@ -BITNAMI_TEAM='["Akinorev","CeliaGMqrz","ClaaudiaGarcia","FraPazGal","Javirln","Mauraza","agarcia-oss","alemorcuq","alexherp","alvneiayu","andresbono","antgamdia","aoterolorenzo","beltran-rubo","bitnami-bot","carlossm","carrodher","castelblanque","corico44","cscazorla","dani8art","dariver","dcristobalhMad","dgomezleon","fevisera","fjagugar","fmulero","gdelgadot","gfichtenholt","gongomgra","javsalgar","jbianquetti-nami","jiparis","joancafom","jotadrilo","jotamartos","juamedgod","juan131","kaysavps","mdhont","migruiz4","mpermar","pablogalegoc","ppbaena","rafariossaa","rloporp","rogelio-o","tompizmor","xoanteis","zubero"]' -IN_PROGRESS_COLUMN_ID=18834407 -TRIAGE_COLUMN_ID=18834406 -SOLVED_COLUMN_ID=18834409 -ON_HOLD_COLUMN_ID=18834408 -BITNAMI_COLUMN_ID=18976470 -PENDING_COLUMN_ID=18872833 -SUPPORT_TEAM_NAME='vms-support' -TRIAGE_TEAM_NAME='vms-triage' \ No newline at end of file diff --git a/.github/workflows/moving-cards.yml b/.github/workflows/moving-cards.yml deleted file mode 100644 index 81746c4..0000000 --- a/.github/workflows/moving-cards.yml +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright VMware, Inc. -# SPDX-License-Identifier: APACHE-2.0 - -# This workflow is built to manage the triage support by using GH issues. -name: '[Support] Cards movements' -on: - project_card: - types: - - created - - moved -# Remove all permissions by default -permissions: {} -jobs: - get-issue: - runs-on: ubuntu-latest - name: Get issue info - permissions: - issues: read - pull-requests: read - outputs: - assignees: ${{ steps.get-issue-step.outputs.assignees }} - author: ${{ steps.get-issue-step.outputs.author }} - type: ${{ steps.get-issue-step.outputs.type }} - draft: ${{ steps.get-issue-step.outputs.draft }} - number: ${{ steps.get-issue-step.outputs.number }} - steps: - - name: Get issue info - id: get-issue-step - run: | - issue_info=$(curl -s --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -X GET -G "${{ github.event.project_card.content_url }}" ) - assignees="$(echo $issue_info | jq -cr '.assignees')" - author="$(echo $issue_info | jq -r '.user.login')" - pull_request="$(echo $issue_info | jq -r '.pull_request')" - draft="$(echo $issue_info | jq -r '.draft' | sed -r "s|null|false|g")" - number="$(echo $issue_info | jq -r '.number')" - type="pull_request" - if [[ "${pull_request}" == "null" ]]; then - type="issue" - fi - echo "assignees=${assignees}" >> $GITHUB_OUTPUT - echo "author=${author}" >> $GITHUB_OUTPUT - echo "type=${type}" >> $GITHUB_OUTPUT - echo "draft=${draft}" >> $GITHUB_OUTPUT - echo "number=${number}" >> $GITHUB_OUTPUT - label-card: - runs-on: ubuntu-latest - permissions: - contents: read - issues: write - pull-requests: write - needs: - - get-issue - steps: - - name: Repo checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - fetch-depth: 1 - - name: Load .env file - uses: xom9ikk/dotenv@de1ff27d319507880e6621e4d47424c677d95f68 - with: - path: .github/workflows/ - # Now handling the needed labeling - - name: Triage labeling - # Only if moved into triage - if: ${{ github.event.project_card.column_id == env.TRIAGE_COLUMN_ID }} - uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da - with: - add-labels: triage - remove-labels: on-hold, in-progress, solved - - name: From Bitnami labeling - if: ${{ github.event.project_card.column_id == env.BITNAMI_COLUMN_ID }} - uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da - with: - add-labels: ${{ (needs.get-issue.outputs.author == 'bitnami-bot' && needs.get-issue.outputs.type == 'pull_request') && 'automated, auto-merge' || 'bitnami' }} - remove-labels: on-hold, in-progress, triage, solved - - name: Verify labeling - # Only if moved into bitnami column and the PR is ready for review - # Consecutive calls were fixed in fmulero/labeler, see https://github.com/fmulero/labeler/pull/2 - if: | - github.event.project_card.column_id == env.BITNAMI_COLUMN_ID && - needs.get-issue.outputs.type == 'pull_request' && needs.get-issue.outputs.draft == 'false' - uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da - with: - repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }} - add-labels: verify - - name: On hold labeling - # Only if moved into on hold - if: ${{ github.event.project_card.column_id == env.ON_HOLD_COLUMN_ID }} - uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da - with: - add-labels: on-hold - remove-labels: triage, in-progress, solved - - name: In progress labeling - # Only if moved into In progress - if: ${{ github.event.project_card.column_id == env.IN_PROGRESS_COLUMN_ID }} - uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da - with: - add-labels: in-progress - remove-labels: on-hold, triage, solved - - name: Solved labeling - # Only if moved into Solved and the issue author is not bitnami-bot - if: | - github.event.project_card.column_id == env.SOLVED_COLUMN_ID && - (needs.get-issue.outputs.author != 'bitnami-bot') - uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da - with: - add-labels: solved - # Triage is not on the list to know how many issues/PRs are solved - # directly on triage - remove-labels: in-progress, on-hold - assign-assignee-if-needed: - runs-on: ubuntu-latest - permissions: - contents: read - needs: - - get-issue - # The job shouldn't run for solved cards - steps: - - name: Repo checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - fetch-depth: 1 - - name: Load .env file - uses: xom9ikk/dotenv@de1ff27d319507880e6621e4d47424c677d95f68 - with: - 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@edee9537367a8fbc625d27f9e10aa8bad47b8723 - with: - numOfAssignee: 1 - teams: ${{ github.event.project_card.column_id == env.BITNAMI_COLUMN_ID && env.SUPPORT_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@edee9537367a8fbc625d27f9e10aa8bad47b8723 - with: - numOfAssignee: 1 - removePreviousAssignees: true - teams: ${{ env.SUPPORT_TEAM_NAME }} - repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }} - allowSelfAssign: false diff --git a/.github/workflows/sync-teams.yml b/.github/workflows/sync-teams.yml deleted file mode 100644 index ea17f74..0000000 --- a/.github/workflows/sync-teams.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright VMware, Inc. -# SPDX-License-Identifier: APACHE-2.0 - -name: '[Support] Synchronize team members in the .env file' -on: - workflow_dispatch: - schedule: - # Daily - - cron: '0 5 * * *' -# Remove all permissions by default. Write actions are done by Bitnami Bot -permissions: {} -jobs: - sync-support-teams: - runs-on: ubuntu-latest - steps: - - name: Repo checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - token: ${{ secrets.BITNAMI_BOT_TOKEN }} - fetch-depth: 1 - - name: Load .env file - uses: xom9ikk/dotenv@de1ff27d319507880e6621e4d47424c677d95f68 - with: - path: .github/workflows/ - - name: Updating members of the Bitnami team - env: - TOKEN: ${{ secrets.BITNAMI_BOT_TOKEN }} - run: | - TEAM_MEMBERS=$(curl --request GET \ - --url https://api.github.com/orgs/bitnami/teams/developers/members?per_page=100 \ - --header "authorization: Bearer ${TOKEN}" \ - --header 'content-type: application/json' \ - | jq 'sort_by(.login)|map(.login)|join(",")') - TEAM_MEMBERS='['${TEAM_MEMBERS//','/'","'}']' - if [ $TEAM_MEMBERS != $BITNAMI_TEAM ]; then - echo "Replacing $BITNAMI_TEAM for $TEAM_MEMBERS" - sed -i "s|BITNAMI_TEAM=.*$|BITNAMI_TEAM='${TEAM_MEMBERS}'|g" .github/workflows/.env - git config user.name "bitnami-bot" - git config user.email "bitnami-bot@vmware.com" - git commit -s -m"[bitnami-bot] Updating Bitnami team members" .github/workflows/.env - git push - else - echo "BITNAMI_TEAM is updated and nothing should be done" - fi \ No newline at end of file