Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
This repository was archived by the owner on May 1, 2025. It is now read-only.

RFW: Automatically close old/irrelevant PRs #20

Description

@davegaeddert

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFWRequests for WorkenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions