Skip to content

[BUG] Repository creation as archived would fail#3084

Draft
deiga wants to merge 6 commits intointegrations:mainfrom
F-Secure-web:fix-repo-creation-as-archived
Draft

[BUG] Repository creation as archived would fail#3084
deiga wants to merge 6 commits intointegrations:mainfrom
F-Secure-web:fix-repo-creation-as-archived

Conversation

@deiga
Copy link
Collaborator

@deiga deiga commented Jan 16, 2026


Before the change?

  • Creating a new github_repository resource with archived = true and visibility = "private" would fail with 403
  • Docs stated that unarchiving a repository via API wasn't supported

After the change?

  • Creating a new github_repository resource with archived = true will "stop" execution in Create to only set archived on the repo.
  • Docs updated to show that unarchiving is supported

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

@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 Jan 16, 2026
@deiga deiga marked this pull request as draft January 16, 2026 21:25
@deiga deiga marked this pull request as ready for review January 16, 2026 22:33
@stevehipwell stevehipwell added this to the v6.11.0 Release milestone Jan 16, 2026
deiga added 6 commits January 22, 2026 23:04
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
...and skips further updates to the repository

Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
@deiga deiga force-pushed the fix-repo-creation-as-archived branch from bf12956 to 63bca10 Compare January 22, 2026 21:06
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.

@deiga could we not just add a diff check function and disable the creation of archived repositories full stop? We could re-visit the functionality once the repository resource has been refactored.

On a separate note, the repository resource really needs to be refactored to avoid the calling of create -> update -> read or update -> read.

@deiga
Copy link
Collaborator Author

deiga commented Jan 27, 2026

@deiga could we not just add a diff check function and disable the creation of archived repositories full stop? We could re-visit the functionality once the repository resource has been refactored.

On a separate note, the repository resource really needs to be refactored to avoid the calling of create -> update -> read or update -> read.

Yes please to the latter.

Fair point to the former. I'll need to revisit this PR as my solution probably didn't consider "what should we allow"

@stevehipwell
Copy link
Collaborator

@deiga do you already have an issue tracking the refactoring work?

@deiga
Copy link
Collaborator Author

deiga commented Jan 27, 2026

@deiga do you already have an issue tracking the refactoring work?

@stevehipwell Not for the whole repo changes, just the vulnerability alerts

@stevehipwell
Copy link
Collaborator

@deiga FYI #3133

@deiga deiga marked this pull request as draft January 29, 2026 20:36
@deiga deiga removed this from the v6.11.0 Release milestone Jan 29, 2026
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.

2 participants