google-github-actions / google-github-actions/run-gemini-cli
Group the roles in WIF setup script
Open
Nobody has claimed this yet.
area/auth
kind/cleanup
priority/p2
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 285
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 1
Description
🟢 For better readability and maintainability, you could group these roles into an array and loop through them.
# Grant additional roles to the service account
print_info "Granting additional roles to Service Account..."
for role in \
"roles/logging.logWriter" \
"roles/monitoring.editor" \
"roles/cloudtrace.agent" \
"roles/aiplatform.user"
do
gcloud projects add-iam-policy-binding "${GOOGLE_CLOUD_PROJECT}" \
--role="$role" \
--member="serviceAccount:${SERVICE_ACCOUNT_EMAIL}" \
--condition=None
done
Originally posted by @gemini-cli[bot] in https://github.com/google-github-actions/run-gemini-cli/pull/82#discussion_r2248997889
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the WIF setup script and locate the repeated gcloud IAM role-grant commands shown in the issue. Group the four roles into a loop while preserving the existing service account, project, member, and condition arguments; done means the script grants the same roles with less repetition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, google-cloud, shell
- Domain
- ci-cd, cloud, devops
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100