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

[BUG]: github_issue_labels can't clobber existing labels #2089

Open
1 task done
ezzatron opened this issue Jan 10, 2024 · 2 comments · May be fixed by #2430
Open
1 task done

[BUG]: github_issue_labels can't clobber existing labels #2089

ezzatron opened this issue Jan 10, 2024 · 2 comments · May be fixed by #2430
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@ezzatron
Copy link

ezzatron commented Jan 10, 2024

Expected Behavior

I expected the github_issue_labels resource to allow me to specify the full list of issue labels I want, even if those issue labels overlap some of the default ones created in a new GitHub repo, or include other existing labels in the repo.

Actual Behavior

When using github_issue_labels with a set of labels that includes an existing label, the apply fails with an error like:

{"@level":"error","@message":"Error: POST https://api.github.com/repos/org/repo/labels: 422 Validation Failed [{Resource:Label Field:name Code:already_exists Message:}]","@module":"terraform.ui","@timestamp":"2024-01-10T04:48:36.512181Z","diagnostic":{"severity":"error","summary":"POST https://api.github.com/repos/org/repo/labels: 422 Validation Failed [{Resource:Label Field:name Code:already_exists Message:}]","detail":"","address":"module.name.github_issue_labels.this","range":{"filename":"modules/repo/issue-labels.tf","start":{"line":8,"column":39,"byte":246},"end":{"line":8,"column":40,"byte":247}},"snippet":{"context":"resource \"github_issue_labels\" \"this\"","code":"resource \"github_issue_labels\" \"this\" {","start_line":8,"highlight_start_offset":38,"highlight_end_offset":39,"values":[]}},"type":"diagnostic"}

This makes it impossible to use this resource with a set of labels that includes any of the default labels for new repos. This would be fine if you could simply omit those labels, but if you do, the default labels will be removed on subsequent runs.

Terraform Version

Terraform v1.6.6
on darwin_arm64
+ provider registry.terraform.io/integrations/github v5.43.0

Affected Resource(s)

  • github_issue_labels

Terraform Configuration Files

No response

Steps to Reproduce

No response

Debug Output

No response

Panic Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ezzatron ezzatron added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jan 10, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jan 18, 2024
Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Oct 15, 2024
@ezzatron
Copy link
Author

As far as I'm aware this is still an issue.

@github-actions github-actions bot removed the Status: Stale Used by stalebot to clean house label Oct 16, 2024
@stevehipwell stevehipwell linked a pull request Oct 17, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants