Skip to content

Commit

Permalink
Assign Bitnami PRs to support teams directly (#29)
Browse files Browse the repository at this point in the history
Signed-off-by: Fran Mulero <fmulero@vmware.com>
  • Loading branch information
fmulero authored Jan 9, 2024
1 parent cd05363 commit 7b78663
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/item-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ jobs:
number="${{ github.event.issue != null && github.event.issue.number || github.event.pull_request.number }}"
type="${{ github.event.issue != null && 'issue' || 'pull_request' }}"
repo_name="${{ github.event.repository.name }}"
[[ "${BITNAMI_TEAM}" == *"${author}"* ]] && group="support" || group="triage"
assignment=$(echo "$REPO_ASSIGNMENT" | jq -cr ".\"${repo_name}\" // .default")
assignment_team=$(echo "$assignment" | jq -cr ".\"triage-teams\" // empty")
assignees=$(echo "$assignment" | jq -cr ".\"triage-assignees\" // empty")
assignment_team=$(echo "$assignment" | jq -cr ".\"${group}-teams\" // empty")
assignees=$(echo "$assignment" | jq -cr ".\"${group}-assignees\" // empty")
# If there is no assignees and the team is not empty
if [[ -n "$assignment_team" ]] && [[ -z "$assignees" ]]; then
assignees=$(gh api "/orgs/bitnami/teams/${assignment_team}/members" |jq -cr 'sort_by(.login)|map(.login)|join(",")')
Expand Down

0 comments on commit 7b78663

Please sign in to comment.