Skip to content

Backup only forks that are ahead of upstream #498

@pl4nty

Description

@pl4nty

What would you like to happen?

I often create forks for single PRs, and forget to delete them after the PR is merged. So I'm backing up many repos with no unique data. I do have some forks with meaningful changes though, and I want to ensure those are backed up.

Before backing up a fork, we could query the GitHub API to only continue if it's ahead of upstream. I guess this would need a new argument too, maybe --forks-only-ahead?

Unknowns

This might have some edge cases, like repos that merge manually rather than PRs, but in my case it would reduce backup size by more than half.

Workarounds

Deleting forks after my PRs merge. A bit annoying, but better than nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions