Allow more repo config#109
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 25 minutes and 43 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds additional GitHub repo/teams configuration capabilities to the github_repos template module, including ruleset merge-method controls, repo topics, and autolink reference support, plus stricter team-member validation.
Changes:
- Add validation that all configured team members/maintainers exist in
org_members, with a new dedicated exception and unit tests. - Extend
GithubRepoConfigto supportallowed_merge_methods,topics, andautolink_references, and create GitHub autolink resources via Pulumi. - Export new repo/team config helpers via
lib/__init__.pyand introduce a placeholder global autolink configuration hook inrepos.py.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| template/tests/unit/{% if manage_github_repos %}github_repos{% endif %}/test_teams.py | Adds unit tests covering new team-member-in-org validation and define_team_configs integration. |
| template/src/aws_central_infrastructure/{% if manage_github_repos %}github_repos{% endif %}/repos.py | Introduces a global autolink configuration hook (currently a no-op update). |
| template/src/aws_central_infrastructure/{% if manage_github_repos %}github_repos{% endif %}/lib/teams.py | Adds missing-member validation for team configs with a new exception type. |
| template/src/aws_central_infrastructure/{% if manage_github_repos %}github_repos{% endif %}/lib/repo.py | Adds repo config fields (merge methods, topics, autolinks) and creates ruleset + autolink Pulumi resources. |
| template/src/aws_central_infrastructure/{% if manage_github_repos %}github_repos{% endif %}/lib/init.py | Re-exports new public symbols (AutoLinkConfig, GLOBAL_AUTOLINKS, new team error). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| autolinks = GLOBAL_AUTOLINKS | set(config.autolink_references) | ||
|
|
||
| for autolink in autolinks: | ||
| _ = RepositoryAutolinkReference( | ||
| append_resource_suffix(f"{config.name}-{autolink.ticket_prefix}-autolink", max_length=150), | ||
| repository=config.name, | ||
| key_prefix=autolink.ticket_prefix, | ||
| target_url_template=autolink.url, | ||
| opts=ResourceOptions(parent=self, provider=provider, depends_on=conditional_repo_depends), | ||
| ) |
| from .lib import GLOBAL_AUTOLINKS | ||
| from .lib import GithubRepoConfig | ||
|
|
||
| GLOBAL_AUTOLINKS.update([]) |
| class GithubTeamMemberNotInOrgMembersError(Exception): | ||
| def __init__(self, *, username: str, team_name: str): | ||
| super().__init__( | ||
| f"Team member '{username}' in team '{team_name}' is not listed in org_members.everyone or org_members.org_admins. Add them to org_members.everyone first." |
Why is this change necessary?
Need to be able to specify allowed merge types in a ruleset. Also autolink with Jira issues
How does this change address the issue?
Adds options to do that
What side effects does this change have?
N/A
How is this change tested?
Downstream repo
Other
backport some other stuff about teams and testing that people have been added to teams