Skip to content

Allow more repo config#109

Merged
ejfine merged 5 commits into
mainfrom
more-repo-config
Apr 23, 2026
Merged

Allow more repo config#109
ejfine merged 5 commits into
mainfrom
more-repo-config

Conversation

@ejfine
Copy link
Copy Markdown
Contributor

@ejfine ejfine commented Apr 23, 2026

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

@ejfine ejfine self-assigned this Apr 23, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@ejfine has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 43 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 871449b7-dc71-4faa-8c19-3ba0b2b887ae

📥 Commits

Reviewing files that changed from the base of the PR and between c6fdab1 and 08a707a.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • .devcontainer/devcontainer.json
  • template/src/aws_central_infrastructure/{% if manage_github_repos %}github_repos{% endif %}/lib/__init__.py
  • template/src/aws_central_infrastructure/{% if manage_github_repos %}github_repos{% endif %}/lib/repo.py
  • template/src/aws_central_infrastructure/{% if manage_github_repos %}github_repos{% endif %}/lib/teams.py
  • template/src/aws_central_infrastructure/{% if manage_github_repos %}github_repos{% endif %}/repos.py
  • template/tests/unit/{% if manage_github_repos %}github_repos{% endif %}/test_teams.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ejfine ejfine requested a review from Copilot April 23, 2026 02:03
@ejfine ejfine marked this pull request as ready for review April 23, 2026 02:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 GithubRepoConfig to support allowed_merge_methods, topics, and autolink_references, and create GitHub autolink resources via Pulumi.
  • Export new repo/team config helpers via lib/__init__.py and introduce a placeholder global autolink configuration hook in repos.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.

Comment on lines +226 to +235
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."
@ejfine ejfine enabled auto-merge (squash) April 23, 2026 02:08
@ejfine ejfine merged commit 5631727 into main Apr 23, 2026
17 checks passed
@ejfine ejfine deleted the more-repo-config branch April 23, 2026 02:10
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.

3 participants