integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
867 stars 708 forks source link

[FEAT]: Support GitHub repository custom properties #1956

Open yu-iskw opened 9 months ago

yu-iskw commented 9 months ago

Describe the need

GitHub just announced the feature of GitHub repository custom properties. We can use the information of custom properties to apply rules to repository in GitHub organization(s). It would be good to support the feature in the terraform provider as well. By doing that, we will be able to manage custom properties and rule sets in terraform.

https://github.blog/changelog/2023-10-12-github-repository-custom-properties-beta/

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

kfcampbell commented 8 months ago

Unfortunately, this feature is not released on the API yet. Once support is added in the API, we can implement it in the provider.

usmonster commented 7 months ago

Looks like a REST API is in public beta now. Is that enough to get started? Thanks!

kfcampbell commented 7 months ago

Ideally there would be more than just a GET. We could make a data source with the existing endpoint, but not a full resource.

laughedelic commented 7 months ago

There are more endpoints here (incl. creation): https://docs.github.com/en/rest/orgs/custom-properties?apiVersion=2022-11-28

kfcampbell commented 7 months ago

Ahh my mistake, thanks for correcting me!

roeishuster commented 7 months ago

Hey, do you guys plan on adding this in an upcoming provider update?

kfcampbell commented 6 months ago

GitHub's SDK team unfortunately does not have the bandwidth to take this on ourselves, though we're very receptive of PRs!

alileza commented 5 months ago

@kfcampbell I'll make an attempt to PR soon, just drafted init. But I might just found some blockers of GitHub API didn't respond custom property id, because on resource update I got an error of expected numerical ID. strconv.ParseInt: parsing, but no ID on the api.

If you can give a bit of hint, on the draft PR I have, that would be superb

nayuta commented 4 months ago

Hi, I also need to support custom properties for repositories. However, it needs to update go-github. So, I created the issue: https://github.com/integrations/terraform-provider-github/issues/2187

nnellanspdl commented 4 months ago

This would be a welcome addition.

kfcampbell commented 4 months ago

It's worth noting that we (GitHub's SDK team) are working on a Go SDK generated from GitHub's OpenAPI specification. It includes all routes published in the GitHub API, so coverage doesn't need to be added manually. I've been looking for an excuse to add it to the project; this could be it.

Simon-Boyer commented 3 months ago

I have a client that will need this very soon. If I can help fast-track this by contributing I can put some hours in this. I see there is already a PR opened and some discussions around the Go SDK, is there anything I can do here?

connor-miller-kr commented 2 months ago

Any update on this feature?

Simon-Boyer commented 2 months ago

Any update on this feature?

I wouldnt mind contributing for this feature as soon as the go-github client is bumped to v60. But that PR looks a bit stuck...

larmitage-bjss commented 1 day ago

Now the go-github PR has been merged is there potential for any progress on this feature soon? Thanks!