Skip to content

Conversation

@deiga
Copy link
Contributor

@deiga deiga commented Dec 18, 2025

Resolves #3009
Resolves #3004


Before the change?

  • role_id wouldn't not be set during apply, only on next plan, thus rendering the resource unusable for references

After the change?

  • role_id is set in Create allowing it to be used in references

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Since it's a computed value, it should be set in Create and Read

Signed-off-by: Timo Sand <timo.sand@f-secure.com>
@github-actions
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@github-actions github-actions bot added the Type: Bug Something isn't working as documented label Dec 18, 2025
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
@deiga deiga marked this pull request as ready for review December 18, 2025 22:29
@stevehipwell stevehipwell added this to the v6.9.1 Patch milestone Dec 18, 2025
Copy link
Collaborator

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The part of this PR fixing the role ID looks good, but I'm not sure about the other changes.

According to the API docs the base role should be set to "none". This is the fix applied in #2968 which this PR appears to be undoing?

@deiga
Copy link
Contributor Author

deiga commented Dec 19, 2025

The part of this PR fixing the role ID looks good, but I'm not sure about the other changes.

According to the API docs the base role should be set to "none". This is the fix applied in #2968 which this PR appears to be undoing?

Yeah, I see those docs, but running the tests on GHEC gives me a 422 Validation error if I'm passing in "none".

When running a manual curl with base_role: "none" I get this response:

{
	"message": "Invalid request.\n\nInvalid property /base_role: `none` is not a possible value. Must be one of the following: read, triage, write, maintain, admin.",
	"documentation_url": "https://docs.github.com/rest/orgs/organization-roles#create-a-custom-organization-role",
	"status": "422"
}

Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Copy link
Collaborator

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Something isn't working as documented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: github_organization_role_team doesn't wait for role_id [BUG]: github_organization_role setting base_role = "none" causes permanent diff

2 participants