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

feat: add unarchiving plugin #692

Merged
merged 3 commits into from
Jan 20, 2025

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

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
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
3 participants