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

Allow label renaming #60

Closed
wants to merge 1 commit into from
Closed

Allow label renaming #60

wants to merge 1 commit into from

Conversation

larsks
Copy link

@larsks larsks commented May 27, 2021

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

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
Copy link

@larsks, thank you for creating this PR! I will start using your fork right away. @micnncim, can you please consider merging this?

@mvhaen
Copy link

mvhaen commented Sep 22, 2021

@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)
Copy link

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.

@joeyparrish
Copy link

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.

@micnncim
Copy link
Owner

Thank you very much everyone here and sorry for being too late! I had been quite busy but will check this tomorrow.

@joeyparrish
Copy link

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.

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.

Allow label renaming
4 participants