Skip to content

fix: support repository rename in github_actions_repository_oidc_subject_claim_customization_template - #3396

Open
acouvreur wants to merge 5 commits into
integrations:mainfrom
acouvreur:resource_github_actions_repository_oidc_subject_claim_customization_template-repository-rename
Open

acouvreur wants to merge 5 commits into
integrations:mainfrom
acouvreur:resource_github_actions_repository_oidc_subject_claim_customization_template-repository-rename

Conversation

@acouvreur

@acouvreur acouvreur commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Related to #3180

Also note: #3582 changes the same resource file to add use_immutable_subject and sub_claim_prefix. The second PR to merge will need a rebase.


Before the change?

  • When you rename the repository, the plan changes the template in place on the new name, but the resource cannot tell a rename from a different repository.
  • When you change repository to a different repository, the old repository keeps its custom template.
  • The resource uses the deprecated non-context CRUD functions and calls Read at the end of Create and Update.

After the change?

  • New computed repository_id attribute and diffRepository in CustomizeDiff. A rename is an in-place update. A change to a different repository forces a new resource.
  • State upgrader (v0 to v1) adds repository_id with the shared migrateRepositoryWithID helper.
  • The resource ID stays the repository name, so existing state and import IDs do not change.
  • Context-aware CRUD, tflog, and no read-after-write ([MAINT]: Remove read call from create/update #2892).
  • Delete treats a 404 as success.
  • The docs now list repository and repository_id.

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

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown

👋 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! 🚀

…ect_claim_customization_template-repository-rename
@acouvreur

Copy link
Copy Markdown
Contributor Author

@deiga @stevehipwell let me know if I can do anything to facilitate the review of this change

@stevehipwell stevehipwell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR @acouvreur. Could you add an empty test for the migration so we know what we need to enables when we have a pattern. Also you may want to take a look at #3476 which is the latest migration work I've done and should be the best pattern to follow.

@acouvreur acouvreur changed the title fix: support repository rename in resource_github_actions_repository_… fix: support repository rename in github_actions_repository_oidc_subject_claim_customization_template Sep 24, 2026
@acouvreur

Copy link
Copy Markdown
Contributor Author

@stevehipwell I've updated the PR to the latest recommendations and architecture guidelines, can you take a look?

This branch has not been deployed

No deployments
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.

2 participants