You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The github_repository resource needs to be refactored to follow best practice including not calling update & read after create or read after update. This will allow us to refactor the logic as there will be separation between the lifecycles.
👋 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! 🚀
Due to the nature of the Repo create API endpoint all repo settings can't be set during create, which is why it calls update to manage the "rest" of the settings.
With that in mind, what do we think about separating repo and repo_settings into 2 resources? Similar to ORG and org_settings
@deiga which settings are you thinking of? Off the top of my head vulnerability alerts and pages need new resources. I'd also be tempted to move topics into their own resource. Have I missed any other settings?
@deiga which settings are you thinking of? Off the top of my head vulnerability alerts and pages need new resources. I'd also be tempted to move topics into their own resource. Have I missed any other settings?
Naive approach: The diff between github.createRepoRequest and github.Repository. That would ensure that we wouldn't have to call the Create and Edit endpoint in the Create function.
But that might be too naive 😬
And the overlap could be hard to fathom
@deiga it's not that simple, the github.Repository type has all possible fields for a repository. We'd probably need to look at the docs to get a full understanding. But basically the "create" function SHOULD NOT call the "update" function even if we need to hit a second endpoint on create.
@deiga it's not that simple, the github.Repository type has all possible fields for a repository. We'd probably need to look at the docs to get a full understanding. But basically the "create" function SHOULD NOT call the "update" function even if we need to hit a second endpoint on create.
Definitely agree on the latter point.
And I think moving everything out isn't a great option either.
Some potential ones in addition to the mentioned ones:
security_and_analysis: Since these can be limited by organization/enterprise maybe it could be a nicer UX to manage these as a separate resource
topics: Since they anyway need to be managed by a separate endpoint
I linked #2090 as I think the refactor could include changes to how template changes are being enacted.
Steve mentions that changing template should probably recreate the github_repository resource and I think that sounds reasonable
There are PRs for extracting pages and vulnerability alerts to separate resources. Once those are finalized it makes sense to do first round of modernization in github_repository
Any reason we can't have a temp fix for now, like a retry or even a sleep for 1 second would likely fix the issue. I can't use a sleep in the resource chain because it's within the code of a resource. However as I said in the original issue, if you are geographically further away from the API then everything works. So we are talking about a very small amount of time, likely not even noticeable to a human to fix this.
I understand that you want to do a real fix, but we currently have an issue that is really easy to fix, but we are now waiting for all these other PRs to come in. It's been months already since I first made the issue. That's a long time to wait for what feels like a few of lines of code.
@robogoblin please take into account that we maintain this as a community effort. We give our free time to this project.
And for a really long while there was no active maintenance going on.
There is a lot of cruft that needs to be addressed. Which is why we don't generally do "quick fixes" as there isn't easy to just iterate on them.
If you have a critical need for a fix, please feel free to submit a PR.
Activity
github-actions commentedon Jan 27, 2026
👋 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! 🚀deiga commentedon Jan 28, 2026
Due to the nature of the Repo create API endpoint all repo settings can't be set during create, which is why it calls update to manage the "rest" of the settings.
With that in mind, what do we think about separating repo and repo_settings into 2 resources? Similar to ORG and org_settings
stevehipwell commentedon Jan 28, 2026
@deiga which settings are you thinking of? Off the top of my head vulnerability alerts and pages need new resources. I'd also be tempted to move topics into their own resource. Have I missed any other settings?
deiga commentedon Jan 29, 2026
Naive approach: The diff between
github.createRepoRequestandgithub.Repository. That would ensure that we wouldn't have to call the Create and Edit endpoint in the Create function.But that might be too naive 😬
And the overlap could be hard to fathom
stevehipwell commentedon Jan 30, 2026
@deiga it's not that simple, the
github.Repositorytype has all possible fields for a repository. We'd probably need to look at the docs to get a full understanding. But basically the "create" function SHOULD NOT call the "update" function even if we need to hit a second endpoint on create.deiga commentedon Jan 30, 2026
Definitely agree on the latter point.
And I think moving everything out isn't a great option either.
Some potential ones in addition to the mentioned ones:
security_and_analysis: Since these can be limited by organization/enterprise maybe it could be a nicer UX to manage these as a separate resourcetopics: Since they anyway need to be managed by a separate endpointgithub_repository_vulnerability_alerts#3038vulnerability_alertsfields fromgithub_repository#3039deiga commentedon Feb 8, 2026
I just realised that
topicsalready have an existing resource, so we can just deprecate the fieldgithub_repository_pages#3167pagesfield fromgithub_repositoryR/DS #3169deiga commentedon Feb 11, 2026
I linked #2090 as I think the refactor could include changes to how
templatechanges are being enacted.Steve mentions that changing
templateshould probably recreate thegithub_repositoryresource and I think that sounds reasonablegithub_repository#2264deiga commentedon Feb 11, 2026
These changes should resolve #2604 as we reduce the API calls
robogoblin commentedon Mar 27, 2026
Is there any movement on this?
deiga commentedon Mar 27, 2026
There are PRs for extracting pages and vulnerability alerts to separate resources. Once those are finalized it makes sense to do first round of modernization in github_repository
robogoblin commentedon Mar 28, 2026
Any reason we can't have a temp fix for now, like a retry or even a sleep for 1 second would likely fix the issue. I can't use a sleep in the resource chain because it's within the code of a resource. However as I said in the original issue, if you are geographically further away from the API then everything works. So we are talking about a very small amount of time, likely not even noticeable to a human to fix this.
I understand that you want to do a real fix, but we currently have an issue that is really easy to fix, but we are now waiting for all these other PRs to come in. It's been months already since I first made the issue. That's a long time to wait for what feels like a few of lines of code.
deiga commentedon Mar 28, 2026
@robogoblin please take into account that we maintain this as a community effort. We give our free time to this project.
And for a really long while there was no active maintenance going on.
There is a lot of cruft that needs to be addressed. Which is why we don't generally do "quick fixes" as there isn't easy to just iterate on them.
If you have a critical need for a fix, please feel free to submit a PR.
robogoblin commentedon Mar 28, 2026
Firstly, thank you for your effort to maintain this, I don't mean to come off as harsh.
I'll do a PR for a temp fix that we can use and then test it with the workflow that I have already.