Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cached Group Memberships Cause Incorrect Team Assignments #607

Open
gennadijbgl opened this issue Nov 15, 2024 · 2 comments
Open

Cached Group Memberships Cause Incorrect Team Assignments #607

gennadijbgl opened this issue Nov 15, 2024 · 2 comments
Assignees
Labels
bug Something isn't working 👀.

Comments

@gennadijbgl
Copy link

Describe the bug
gitStream.cm is using cached group membership data for assigning labels and reviewers, resulting in incorrect team assignments. Specifically, I was initially assigned to the "Red" team but later moved to a different team. I left the "Red" team few day ago, yet the red_pr automation still triggers for my pull requests even after 24 hours.

For instance, the "Red" team is being assigned to pull requests authored by me, even though my current team membership no longer includes "Red."

To Reproduce

Steps to reproduce the behavior:
red_pr: if: - {{ title.Red or author.Red }} run: - action: add-label@v1 args: label: 'Red' - action: add-reviewers@v1 args: reviewers: [{{ team.Red }}]

Expected behavior
The automation should fetch and use real-time or recently updated group membership data from GitHub to assign labels and reviewers accurately.

The problem persists even after updating team memberships in GitHub. The gh api /user/teams command confirms that the user is not a member of the "Red" team, but the automation still assigns the team due to cached data in gitStream.cm. There is no apparent way to force-refresh cached group membership data.

@gennadijbgl gennadijbgl added the bug Something isn't working label Nov 15, 2024
@PavelLinearB
Copy link
Member

Hi @gennadijbgl, I'm looking into this issue.
Can you please share how you define the author variable?

@gennadijbgl
Copy link
Author

Hello @PavelLinearB, thank you for looking into
we define it the next way:
author: red: {{ pr.author_teams | includes(term='Red name') }}

@PavelLinearB PavelLinearB self-assigned this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👀.
Projects
None yet
Development

No branches or pull requests

2 participants