Repository navigation
NO-ISSUE: Assign osac-ci-bot, not a maintainer, to maintainers reviews - #288
Merged
Merged
Conversation
Turn review request delegation off for the maintainers team: any member may approve, and GitHub must not pick one of them. The resource keeps no review_request_delegation block, so every apply keeps it off. Notifications are the team's notification setting, which the provider cannot manage; the README says how it is set. Signed-off-by: Elior Erez <eerez@redhat.com>
The provider sets notification_setting on every apply and defaults it to notifications_enabled, so a setting changed by hand is undone at the next apply. State it as notifications_disabled in teams.tf, and correct the README, which said the provider cannot manage it. Signed-off-by: Elior Erez <eerez@redhat.com>
sk-ilya
requested changes
Nov 2, 2026
The notification setting of a team does not cover review requests, so drop it. Make osac-ci-bot the only direct member of maintainers and set review assignment after every apply (the provider cannot set includeChildTeamMembers): it picks the bot, notifies only the bot, and leaves the members of the working groups out. Any of them may still approve. github_team_settings is forgotten, not destroyed. Signed-off-by: Elior Erez <eerez@redhat.com>
A broken resource elsewhere must not hold the maintainers review assignment back, so the step runs after a failed apply too. It first asks for the direct members of the team and does nothing unless osac-ci-bot is one of them: with nobody eligible the assignment would have no one to pick. Signed-off-by: Elior Erez <eerez@redhat.com>
Read back what GitHub says it stored after the mutation (enabled, one member, team not notified) and fail the run when it is not what was asked, so a setting that did not take is not silent. Signed-off-by: Elior Erez <eerez@redhat.com>
sk-ilya
approved these changes
Nov 2, 2026
Only direct members of maintainers can be assigned, so any other direct member would be picked for pull requests. The step now fails when it finds one besides osac-ci-bot, and still leaves the assignment alone when the bot is not a member (yet). The README says so. Signed-off-by: Elior Erez <eerez@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes how the
maintainersteam is assigned review requests, so that nobody is picked at random and nobody is broadcast to. This replaces the earlier content of this pull request (turning delegation off and the team notification setting do not do it: GitHub's docs say the notification setting "does not affect notifications for reviews requested from the team", as @sk-ilya pointed out).What
CODEOWNERS sends every path no working group owns to
@osac-project/maintainers, and any member of a working group may approve (members of the child teams count as members ofmaintainers). GitHub notifies every member of a team that is requested for review; the only switch is review assignment, which assigns members and notifies only them. So:osac-ci-botbecomes the only direct member ofmaintainers(github_team_membership.maintainers_review_sink). It is already an organization member and inwg-infra. It approves nothing, and nothing waits for it.maintainers:LOAD_BALANCE, one member, team not notified, andincludeChildTeamMembers: false, so only direct members are eligible: it always picks the bot. A pull request listsmaintainersandosac-ci-botas reviewers; the bot's request stays pending.includeChildTeamMembers, soapply.yamlsets all of it with the GraphQL mutationupdateTeamReviewAssignmentafter every apply (scheduled ones included). It is idempotent and puts the setting back if someone changes it by hand.github_team_settings.maintainers(from NO-ISSUE: Assign one load-balanced maintainers reviewer #286) is forgotten with aremovedblock anddestroy = false, so nothing is destroyed or switched off, and the apply step owns the setting.wg-infra,wg-vmaas, ...) are requested and notified as usual. The README explains the design.Checked / not checked
includeChildTeamMembers(GitHub's schema), the enum and field types match the query, and the apply token already ran the same mutation throughgithub_team_settings.maintainersandosac-ci-bot, and no person should be notified.tofu fmtruns in CI only (notofuwhere I wrote it).Please review, @sk-ilya.
Summary
github_team_membership.maintainers_review_sink, makingosac-ci-bota direct member ofmaintainers. Removes the oldgithub_team_settings.maintainersresource from active management without destroying it.TF Applyis not skipped,.github/workflows/apply.yamlchecks for themaintainersteam and the bot’s direct membership. If the team is missing, the step fails. If the bot is not a direct member, it warns and leaves the assignment unchanged. Otherwise, it runsupdateTeamReviewAssignmentwith load balancing, one member, child-team members excluded, team notifications disabled, and the team request retained. It verifies the returned enabled, member-count, and notification settings. The step also runs after a failed apply unless the workflow is cancelled.Compatibility and verification
The change alters GitHub team review-assignment behavior and stops managing the previous provider resource without destroying its setting. The workflow cannot read back
includeChildTeamMembers, so that value is not covered by its read-back check. The intended GitHub behavior remains unverified. No test results are available.Risk classification
risk:ask — Applied provisionally because the intended assignment and notification behavior has not been verified. The risk-label criteria were not supplied, so this classification cannot be matched to documented criteria. risk:show may be a nearby alternative, but whether it qualifies cannot be determined without those criteria.