Skip to content

Conversation

leehagoodjames
Copy link
Contributor

@leehagoodjames leehagoodjames commented Aug 13, 2025

The workflows for https://github.com/google-github-actions/run-gemini-cli enable restrictions on who can invoke them, to prevent abuse scenarios by untrusted users.

A better solution would enable reliably checking repository membership with github.event.issue.author_association, but this is not possible since github.event.issue.author_association can return CONTRIBUTOR even when the author is also a MEMBER. Given this, actions/github-script#643 has been filed with GitHub to allow actions to more easily check for membership.

This mitigation simplifies the experience for private repos

Fixes #163

@leehagoodjames
Copy link
Contributor Author

@gemini-cli /review

Copy link

@gemini-cli gemini-cli bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

The pull request relaxes the trigger conditions for the workflows in private repositories. This change is consistently applied across all workflows and seems like a reasonable trade-off between security and convenience for private repositories.

🔍 General Feedback

  • The changes are clear and consistently applied to all relevant workflow files.
  • The new condition github.event.repository.private == true is a good way to differentiate the behavior between public and private repositories.
  • The code is well-commented, explaining the reason for the complex condition.

@osis
Copy link

osis commented Aug 13, 2025

I've had to make this adjustment manually to use these workflows. Happy to see this going through! 🥳

@leehagoodjames leehagoodjames merged commit 96c5b70 into google-github-actions:main Aug 13, 2025
7 checks passed
@sethvargo
Copy link
Member

@leehagoodjames it looks like this is breaking on our repo now. #180 was skipped:
CleanShot 2025-08-13 at 16 20 23@2x

@leehagoodjames
Copy link
Contributor Author

leehagoodjames commented Aug 13, 2025

@leehagoodjames it looks like this is breaking on our repo now. #180 was skipped: CleanShot 2025-08-13 at 16 20 23@2x

Happy to revert if that is helpful, but we were seeing skips before this change because github.event.issue.author_association is returning CONTRIBUTOR (which you are) which is not supported in the list currently

Example from #171
image

@sethvargo
Copy link
Member

Hmm okay. Weird

google-github-actions-bot added a commit that referenced this pull request Aug 14, 2025
## What's Changed
* Highlight core tools and mcp servers in configuration docs by @jerop
in #160
* feat(/review): support pull_request_review &
pull_request_review_comment events by @leehagoodjames in
#161
* Github-workflow to automate validation of new PRs based on
Contribution Guidelines of the repository by @jasmeetsb in
#162
* fix: Update gemini-issue-automated-triage.yml by @teolemon in
#165
* Add instruction for code review limit. by @aliciatang07 in
#168
* feat(logging): Enable debug logging across all workflows and
gemini-cli by @leehagoodjames in
#178
* feat(workflows): reduce restrictions for invoking workflows for
private repos by @leehagoodjames in
#177
* fix(runner): capture stderr and stdout after command finishes by
@sethvargo in
#183
* chore(logging): only enable Gemini debug when DEBUG is set by
@sethvargo in
#180
* feat: improve gemini issue triage workflow by @jerop in
#171

## New Contributors
* @jasmeetsb made their first contribution in
#162
* @teolemon made their first contribution in
#165

**Full Changelog**:
v0.1.10...v0.1.11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

author_association check in example workflows
3 participants