Skip to content

Conversation

@randomcascade
Copy link
Contributor

Meant to resolve #443 may help #559

Inspired by #193 I've added a one-off plugin. It is called archive. In most cases it does nothing, but in case a config for archiving a repo is true and the real repo is not archived this plugin will archive that repo and prevent other plugins from running. This does mean config may not be provided to an archived repo, but since it's being archived that hardly matters. This will also clobber the diff comment for PRs where archived is set to true. We may try setting the nop flag to true in the future if the repo is archived by the Archive plugin, but for the purposes of avoiding the rate limit this should be fine.

@randomcascade
Copy link
Contributor Author

The unit test is rudimentary. Running locally for many cycles has not caused issues, but more tests or review would be appreciated.

@Alex-Mills-seccl
Copy link

👍 this would be super useful for me

@decyjphr decyjphr requested a review from Copilot January 20, 2025 12:09
Copy link
Contributor

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.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

lib/plugins/archive.js:3

  • The returnValue function should always return an object with both shouldContinue and nopCommands to maintain consistency.
function returnValue(shouldContinue, nop) {

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@decyjphr decyjphr merged commit 774b2e5 into github:main-enterprise Jan 20, 2025
2 checks passed
@HagegeR
Copy link

HagegeR commented Jan 21, 2025

Hi, I'm not sure if I should open an issue on this, but when trying the release related to this PR, I get a lot of unnecessary calls to repo.change_merge_setting in my use case, I think it's adding empty changes to the repository config
I'm using full-sync from a GitHub Workflow if that can help narrow down the issue root cause

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.

[Feature Request] Skip archived repositories from being configured

4 participants