unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
363 stars 160 forks source link

Delete useless branches and automatically delete branches of merged pull requests #327

Closed nathanshammah closed 4 years ago

nathanshammah commented 4 years ago

Issue Description

Preamble: Thank you @willzeng and all of you for keeping the branches in order and closing issues related to merged PRs. In the past, we ended up with quite a lot of open branches and we still have 21 open branches, although many are relative to active PRs. We could delete some still.

We could further remove attrition in the mechanics of it all by deleting branches relative to merged PRs automatically.

Proposed Solution

  1. Each of us could review those branches that need not to be there and clean up a bit the situation. Some stale branches seem interesting, some active branches are not useful, there is no size fits all, so I'd give precedence to the branch's author to decide which branches need to be deleted first, and we can assess this together in a future meeting. For reference: https://github.com/unitaryfund/mitiq/branches

  2. For future maintenance, I can enable automatic branch deletion upon merging by ticking the option in the settings. I see no side effect as these can be restored, but wanted to check with you all.

Additional References

docs github

willzeng commented 4 years ago

Thanks Nathan. I deleted merged and my branches.

I'm supportive of auto-deletion on merge.

rmlarose commented 4 years ago

+1

  1. For future maintenance, I can enable automatic branch deletion upon merging by ticking the option in the settings. I see no side effect as these can be restored, but wanted to check with you all.
nathanshammah commented 4 years ago

Ok, done.

nathanshammah commented 4 years ago

Now that the repository is public, one way to automatically reduce the number of branches, besides automatically deleting the branches once merged, would be to fork the repo on our own profile and use that as origin, using unitaryfund/mitiq as upstream. This way the PR would be opened against master and would not create unnecessary remote branches (maybe?).

Previously we did not work on users' forks as Github actions cannot run CI on PRs from private forks, see #49. Now that the repo is public, public forks are fine and this is not an issue.