Skip to content

Fix: Skip settings sync for archived repositories - #4

Draft
StephHope wants to merge 1 commit into
gallagherfrom
shope/skip-archived-repos
Draft

Fix: Skip settings sync for archived repositories#4
StephHope wants to merge 1 commit into
gallagherfrom
shope/skip-archived-repos

Conversation

@StephHope

Copy link
Copy Markdown

AB#25858

Archived repos are read-only on GitHub, so running the repository and child plugins (rulesets, branches, etc.) against them just produced repeated "Repository was archived so is read-only" errors on every sync, including on the hourly cron.

updateRepos now checks archive state up front and skips the rest of the sync for a repo that is archived and not being unarchived. The archive-state check runs inside the same nop-aware try/catch used elsewhere in the method, so a transient failure there (e.g. a rate limit) still degrades gracefully per-repo in NOP/PR-comment mode instead of aborting the whole sync run.

Addresses github-community-projects#443

Archived repos are read-only on GitHub, so running the repository
and child plugins (rulesets, branches, etc.) against them just
produced repeated "Repository was archived so is read-only" errors
on every sync, including on the hourly cron.

updateRepos now checks archive state up front and skips the rest of
the sync for a repo that is archived and not being unarchived. The
archive-state check runs inside the same nop-aware try/catch used
elsewhere in the method, so a transient failure there (e.g. a rate
limit) still degrades gracefully per-repo in NOP/PR-comment mode
instead of aborting the whole sync run.

Addresses github-community-projects#443
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.

1 participant