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

Bsweger/add repo utilities #4

Merged
merged 10 commits into from
Aug 27, 2024
Merged

Bsweger/add repo utilities #4

merged 10 commits into from
Aug 27, 2024

Conversation

bsweger
Copy link
Collaborator

@bsweger bsweger commented Aug 22, 2024

Resolves #2

Create a few utility scripts for batch operations on GitHub repositories in the reichlab organization. As of 2024-08-21, the org contains 152 repos.

Archiving repositories

When the package's archive_repos command runs, it will archive all 63 repos in this list.

Adding rulesets

The "default" ruleset described below isn't meant to be prescriptive. Rather, it's a sensible baseline than can be augmented or revised as needed by anyone with admin access on the repo.

When the package add_default_rulesets command runs, it will add default GitHub rulesets to the default branch (usually master or main) of all 75 repos in this list.

The ruleset we're adding is defined here.

At a high-level, this ruleset:

  • Prevents the default branch from being deleted
  • Requires a PR when update contents of a repo's default branch (no direct pushing to main/master)
  • Requires PR approval from at least 1 reviewer
  • If there are PR updates after it has been approved, re-approval required

[The ruleset doesn't turn on "required checks" (for example running a test suite) because those are repo-specific; that exercise is left to individual repo owners]

If the ruleset causes any issues, it can be easily disabled:

image


The above lists were created based on this spreadsheet: https://docs.google.com/spreadsheets/d/1UaVsqGQ2uyI42t8HWTQjt0MthQJ-o4Yom0-Q2ahBnJc/edit?gid=1230520805#gid=1230520805

The remaining 14 repos will not be updated at this time:

  • 3 are flagged for deletion, which can be done manually
  • 11 are flagged as potentially breaking if we add branch protections (for example, a CI script commits to the default branch)

Copy link
Member

@matthewcornell matthewcornell left a comment

Choose a reason for hiding this comment

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

Approved per live review w/Becky. Nice!

@bsweger bsweger merged commit 0dde39e into main Aug 27, 2024
1 check passed
@bsweger bsweger deleted the bsweger/wip branch August 29, 2024 12:53
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.

Standardize repo config and access across Reich Lab
2 participants