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

Automate repo label syncing #9

Merged
merged 2 commits into from
Jun 8, 2018
Merged

Automate repo label syncing #9

merged 2 commits into from
Jun 8, 2018

Conversation

agjohnson
Copy link
Contributor

Automates all the github label pieces so that our labels are the same across
any of our repos. New labels are from
readthedocs/readthedocs.org#4180

Also is the foundation for better autochangelog, using pygithub directly

Addresses readthedocs/readthedocs.org#4180

Also is the foundation for better autochangelog
@agjohnson
Copy link
Contributor Author

Already did a pass on rtfd/redirect, went smoothly. Also tested against a live repo of mine really quick.

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor refactor comment but looks pretty solid.

found = existing_label
break
if not found:
for existing_label in existing_labels:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can simplify this by doing existing_label.name in ([label.name] + label.transpose) instead of having two loops.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason it is this way is to provide precedence to existing labels before it tries any transposed labels

@agjohnson agjohnson merged commit e38599c into master Jun 8, 2018
@agjohnson agjohnson deleted the agj/auto-repo-label branch June 8, 2018 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants