Skip to content

Adding a computed attribute for the repository owner to the github_repository#2675

Open
AlanCitrix wants to merge 1 commit intointegrations:mainfrom
AlanCitrix:feature-2503-repo-owner-attrib
Open

Adding a computed attribute for the repository owner to the github_repository#2675
AlanCitrix wants to merge 1 commit intointegrations:mainfrom
AlanCitrix:feature-2503-repo-owner-attrib

Conversation

@AlanCitrix
Copy link
Copy Markdown

Resolves #2503


Before the change?

  • The repository owner has to either be parsed out of the full_name, or passed around as a separate variable.

After the change?

  • Repository owner is now a computed field in both the repository resource and data source.
  • The data source can be queried by name + owner when using anonymous auth. full_name will also still work.

Pull request checklist

  • 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

@nickfloyd nickfloyd moved this from 🆕 Triage to 👀 In review in 🧰 Octokit Active Jun 3, 2025
@github-actions github-actions Bot added Type: Feature New feature or request Type: Documentation Improvements or additions to documentation labels Nov 10, 2025
@nickfloyd nickfloyd moved this from Backlog to In Review in Terraform Provider Nov 10, 2025
Copy link
Copy Markdown
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

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

Just a comment about making things a little more safe.

Comment thread github/resource_github_repository.go Outdated
@github-project-automation github-project-automation Bot moved this from 👀 In review to 🏗 In progress in 🧰 Octokit Active Nov 10, 2025
@nickfloyd nickfloyd added this to the v6.x version wrap up milestone Nov 20, 2025
Comment thread github/resource_github_repository.go Outdated
_ = d.Set("topics", flattenStringList(repo.Topics))
_ = d.Set("node_id", repo.GetNodeID())
_ = d.Set("repo_id", repo.GetID())
_ = d.Set("owner", repo.GetOwner().GetLogin())
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 contribution @AlanCitrix!

Minor fix: please run go fmt . to format your files.

Comment thread website/docs/d/repository.html.markdown Outdated
@diofeher diofeher self-assigned this Nov 23, 2025
@nickfloyd nickfloyd self-requested a review December 4, 2025 16:48
@nickfloyd nickfloyd moved this from In Review to BLOCKED in Terraform Provider Dec 4, 2025
@nickfloyd
Copy link
Copy Markdown
Contributor

@AlanCitrix Please let us know if you still would like to see this change land. Given it's been a bit we will move it out of the current target v6 and into a later one v7. If you get the chance and are able to run make lint and fix the issues please let us know.

@AlanCitrix AlanCitrix force-pushed the feature-2503-repo-owner-attrib branch from d1717c6 to 0927341 Compare December 4, 2025 19:35
@AlanCitrix
Copy link
Copy Markdown
Author

@AlanCitrix Please let us know if you still would like to see this change land. Given it's been a bit we will move it out of the current target v6 and into a later one v7. If you get the chance and are able to run make lint and fix the issues please let us know.

Sorry for the delay got it fixed now. That all sounds good thanks!

@AlanCitrix AlanCitrix force-pushed the feature-2503-repo-owner-attrib branch 2 times, most recently from 32f1f01 to a5802d3 Compare December 10, 2025 16:10
@deiga
Copy link
Copy Markdown
Collaborator

deiga commented Dec 10, 2025

Thanks for fixing these!

Since this has been targeted to the v7 release, would you be willing to try rebasing on the github-go-v68 branch?

Though it's not final and you'll possibly need to rebase once we get it merged to main

@AlanCitrix AlanCitrix force-pushed the feature-2503-repo-owner-attrib branch 2 times, most recently from 57f3649 to 5c902b9 Compare December 10, 2025 16:17
@AlanCitrix AlanCitrix changed the base branch from main to go-github-v68 December 10, 2025 16:18
@AlanCitrix AlanCitrix force-pushed the feature-2503-repo-owner-attrib branch 3 times, most recently from a06e93b to 48bc34e Compare December 10, 2025 18:41
@AlanCitrix AlanCitrix force-pushed the feature-2503-repo-owner-attrib branch from 48bc34e to 64c8a61 Compare December 10, 2025 18:53
@AlanCitrix
Copy link
Copy Markdown
Author

Ok had a little fight with git but I think I've got it correct now. @deiga is this what you had in mind to target the github-go-v68 branch?

@deiga
Copy link
Copy Markdown
Collaborator

deiga commented Dec 10, 2025

@AlanCitrix Yes, exactly! Thank you for doing that :)

Now let's hope we can get v7 released ASAP

@deiga deiga removed this from the v7.0.0 Release milestone Jan 24, 2026
@deiga
Copy link
Copy Markdown
Collaborator

deiga commented Jan 24, 2026

@AlanCitrix
We've now been able to upgrade the go-github version without needing a major version bump! Please rebase onto main now :)

@AlanCitrix AlanCitrix changed the base branch from go-github-v68 to main February 18, 2026 20:24
@AlanCitrix AlanCitrix force-pushed the feature-2503-repo-owner-attrib branch from 791b93e to 7daca1e Compare February 18, 2026 20:31
@AlanCitrix
Copy link
Copy Markdown
Author

Done @deiga , please approve the github action

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

Labels

Awaiting response Type: Documentation Improvements or additions to documentation Type: Feature New feature or request

Projects

Status: BLOCKED

Development

Successfully merging this pull request may close these issues.

[FEAT]: Add owner attribute to github_repository data source and resource

5 participants