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

RFW: Automatically close old/irrelevant PRs #20

Open
davegaeddert opened this issue Jan 11, 2021 · 0 comments
Open

RFW: Automatically close old/irrelevant PRs #20

davegaeddert opened this issue Jan 11, 2021 · 0 comments
Labels
enhancement New feature or request RFW Requests for Work

Comments

@davegaeddert
Copy link
Member

davegaeddert commented Jan 11, 2021

Occasionally a user will manually update (or remove) dependencies that deps has already created PRs for. If this happens, deps ci should know how to close the PR and delete the branch automatically.

For now, this behavior should only apply if dependency "types" aren't specified (i.e. deps ci vs deps ci --type python), so that we don't have to worry about accidentally closing PRs for another type than what is currently being processed:

func CI(autoconfigure bool, types []string) error {

We'll basically be adding a new concept of "irrelevant updates" (suggestions for what to call this are welcome, but we already use "outdated" for updates that can be re-updated):

output.Event("%d new updates", len(newUpdates))
output.Event("%d outdated updates", len(outdatedUpdates))
output.Event("%d existing updates", len(existingUpdates))

We should be able to figure out which updates are "irrelevant" by finding all branches that belong to deps, and then finding those that we don't have a new/outdated/existing update for. The PRs can then be found matching the branch names, closed, and the branches deleted.

To start, this feature can be selectively enabled for GitHub. GItLab and Bitbucket support can be added later.

This is a bigger project so please ask questions if you have them!


This RFW is currently worth $500 and you'll be paid when we merge your PR. You can find more information and other RFWs on the Dropseed website.

Any questions can be asked here or through our private contact page!

@davegaeddert davegaeddert added enhancement New feature or request RFW Requests for Work labels Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request RFW Requests for Work
Projects
None yet
Development

No branches or pull requests

1 participant