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

[MAINT]: Deprecate github_organization_custom_role and replace with github_organization_custom_repository_role and github_organization_custom_organization_role #2224

Open
1 task done
cailen opened this issue Apr 10, 2024 · 3 comments · May be fixed by #2487
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Comments

@cailen
Copy link
Contributor

cailen commented Apr 10, 2024

Describe the need

Following up on #1069, it appears Github has decided to split custom roles out into two separate types now and was deprecated Sept 6, 2023 (see https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/custom-roles?apiVersion=2022-11-28#deprecated---create-a-custom-role).

The current implementation (https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_custom_role) I believe should be deprecated and replaced with the following:

Deprecated

  • Resource: github_organization_custom_role
  • Data source: github_organization_custom_role

Replacement

API endpoints found here: https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/custom-roles?apiVersion=2022-11-28
Documentation: https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/about-custom-repository-roles
go-github source: https://github.com/google/go-github/blob/master/github/orgs_custom_roles.go

  • Resource: github_organization_custom_repository_role
  • Data source: github_organization_custom_repository_role

New

API endpoints found here: https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/organization-roles?apiVersion=2022-11-28
Documentation: https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles
go-github source: (It looks like this is not supported yet)

  • Resource: github_organization_custom_organization_role
  • Data source: github_organization_custom_organization_role

SDK Version

n/a

API Version

REST 2022-11-28

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@cailen cailen added Status: Triage This is being looked at and prioritized Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR labels Apr 10, 2024
@cailen cailen changed the title [MAINT]: Deprecate github_organization_custom_role and replace with github_organization_custom_repository_role and github_organization_custom_organization_role [MAINT]: Deprecate github_organization_custom_role and replace with github_organization_custom_repository_role and github_organization_custom_organization_role Apr 10, 2024
@nickfloyd nickfloyd moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Apr 11, 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 Apr 15, 2024
@lewismiddleton
Copy link

Update: Organization custom role support was added to go-github in google/go-github#3129 which got released in v63.

I think the custom role change is the only breaking change relevant for this project, the other breaking change being related to listing runners.

Should this issue be scoped at bumping the go-github package, fixing the custom role breaking API change and implementing the new resources as described?

@maikvandergaag
Copy link

When will this be added to the provider?

@stevehipwell stevehipwell linked a pull request Nov 29, 2024 that will close this issue
4 tasks
@stevehipwell
Copy link
Contributor

I would suggest that you don't need the custom part here and can use github_organization_role & github_organization_repository_role. I'm working on the former in 2487 and could potentially pick up the latter in the same PR.

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: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants