-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Allow label renaming #60
Conversation
Introduce the "alias" attribute for labels so that label-syncer can rename labels, rather than deleting/re-creating them. This preserves labels on existing issues and pull requests. Closes micnncim#59
@joeyparrish did you experience any issues with this? @micnncim would indeed be nice if this could get merged, I also have a use-case where I want to rename a label across multiple repos |
l := &github.Label{ | ||
Name: &label.Name, | ||
Description: &label.Description, | ||
Color: &label.Color, | ||
} | ||
_, _, err := c.githubClient.Issues.EditLabel(ctx, owner, repo, label.Name, l) | ||
_, _, err := c.githubClient.Issues.EditLabel(ctx, owner, repo, labelName, l) | ||
fmt.Printf("label %+v updated on: %s/%s\n", label, owner, repo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you are no longer passing the label, but the labelName. But label is still used in this print statement.
No issues for me so far. I've forked from @larsks, but only to put a consistent module name in place so that I can "go install" and run it locally. |
Thank you very much everyone here and sorry for being too late! I had been quite busy but will check this tomorrow. |
Since this PR has gone for so long without a review or update, I'm going to send a PR from my fork, which is based on that of @larsks, but with additional, related changes I found useful. I hope others find it helpful. |
Introduce the "alias" attribute for labels so that label-syncer can
rename labels, rather than deleting/re-creating them. This preserves
labels on existing issues and pull requests.
Closes #59