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

Add bones-stale-branches command #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

tbekolay
Copy link
Member

This command lists all stale branches in a repository. If you're in a repository with a .nengobones.yml, it will use the provided information. You can also pass a repo on the command line.

Some known issues:

  • In order to avoid rate limiting, you must provide a Github username and personal access token as environment variables. This could be done in a nice way, like using the full OAuth v2 workflow.
  • The call to the list of branches is not properly paginated,so only the first chunk of branches is fetched properly.

Motivation and context:
In looking at nengo/nengo#1485 I wondered if this is the kind of thing we should do regularly (remove stale branches). Since we already have the bones-pr-number script, I thought this might be pretty straightforward. Unfortunately it was not, so before putting more time into it, we should figure out if this is something we actually want.

How has this been tested?
Ran the command for Nengo Bones and Nengo Core.

How long should this take to review?

  • Average (neither quick nor lengthy)

Types of changes:

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have read the CONTRIBUTING.rst document.
  • I have updated the documentation accordingly.
  • I have included a changelog entry.
  • I have added tests to cover my changes.
  • I have run the test suite locally and all tests passed.

This command lists all stale branches in a repository.
If you're in a repository with a .nengobones.yml, it will
use the provided information. You can also pass a repo
on the command line.

Some known issues:

- In order to avoid rate limiting, you must provide a Github
  username and personal access token as environment variables.
- The call to the list of branches is not properly paginated,
  so only the first chunk of branches is fetched properly.
@hunse
Copy link
Collaborator

hunse commented Sep 30, 2019

It's straightforward to view stale branches in Github. Is that sufficient?

@tbekolay
Copy link
Member Author

The idea with something like this is that we would use it as part of an automated process. But yeah not necessarily convinced it's a process we care about at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants