Skip to content

Conversation

@shpomp
Copy link
Contributor

@shpomp shpomp commented Dec 4, 2025

Relates to #152

logic:
step #1: checks if the PR author is in one of the predefined trainee teams
step #2: checks if the PR author is in 'curriculum-crew' team
step #3: if step 1 puts out true and step 2 puts out false, PR is commented and closed*

*If the PR author is in a trainee team and is NOT in the curriculum crew team, it means that it is a trainee making a misdirected submission (safe to assume). In that case, the PR gets commented on and closed. Comment TBD.

👷🏽 Maintenance:

  • for every new team, a team in github is created and all trainees are added to it
  • for every new team, the team slug is added into the appropriate variable in the ENV section of this workflow
  • for every trainee-turned-curriculum-crew, they need to be added to the curriculum crew to make sure they are not blocked by the first check

@rvedotrc
Copy link
Contributor

rvedotrc commented Dec 5, 2025

I had a very simple idea, maybe overly simplistic?

It's almost 100 lines and has a maintenance burden, it doesn't seem that simple ...

const curriculumCrewTeamSlug = process.env.CURRICULUM_CREW_TEAM_SLUG;

try {
await github.rest.teams.getMembershipForUserInOrg({
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't remember exactly, but i tried something like this check on my own version and i had a permission issue, because a trainee submitting it from a fork doesn't by default have permissions to check our org for team ownership. I think we could open this permission for this check, but I was seeing if there was a way to avoid that at first.

Granted, i'm new to actions and still learning, maybe i misunderstood something in my own test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was assuming that trainees permissions would not matter- the workflow runs on repository level permissions. But now that you are questioning it, I am also doubting. I trust your experience would be correct as I am sharing an idea (which is maybe redundant) and not a tested process.
Either way, this is just a conceptual draft to showcase what I was thinking, as I felt I should follow up with the discussion that I abandoned a bit. Let's just forget about it!

@shpomp shpomp closed this Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants