-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
github_repository
- adding support for archived
repositories
#64
Conversation
``` $ acctests github TestAccGithubTeam === RUN TestAccGithubTeamDataSource_noMatchReturnsError --- PASS: TestAccGithubTeamDataSource_noMatchReturnsError (3.81s) === RUN TestAccGithubTeamMembership_basic --- PASS: TestAccGithubTeamMembership_basic (4.98s) === RUN TestAccGithubTeamMembership_importBasic --- PASS: TestAccGithubTeamMembership_importBasic (2.51s) === RUN TestAccGithubTeamRepository_basic --- PASS: TestAccGithubTeamRepository_basic (4.80s) === RUN TestAccGithubTeamRepository_importBasic --- PASS: TestAccGithubTeamRepository_importBasic (3.15s) === RUN TestAccGithubTeam_basic --- PASS: TestAccGithubTeam_basic (2.26s) === RUN TestAccGithubTeam_importBasic --- PASS: TestAccGithubTeam_importBasic (1.38s) PASS ok github.com/terraform-providers/terraform-provider-github/github 22.907s ```
``` $ acctests github TestAccGithubRepositoryDep === RUN TestAccGithubRepositoryDeployKey_basic --- PASS: TestAccGithubRepositoryDeployKey_basic (12.66s) === RUN TestAccGithubRepositoryDeployKey_importBasic --- PASS: TestAccGithubRepositoryDeployKey_importBasic (3.99s) PASS ok github.com/terraform-providers/terraform-provider-github/github 16.677s ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 we discussed internally adding a CustomDiff
func here to perhaps change archived
to a ForceNew
attribute in the event we go from true
back to false
(unarchiving). The reason being that the API does not (at present) provide a means to unarchive a repository.
Beyond adding a note about unarchiving to the documentation, feel free to merge this without the CustomizeDiff
if you'd like, or ping me for another review if you choose to add it
@@ -64,6 +64,8 @@ The following arguments are supported: | |||
and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the | |||
initial repository creation and create the target branch inside of the repository prior to setting this attribute. | |||
|
|||
* `archived` - (Optional) Specifies if the repository should be archived. Defaults to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to document the limitation found about unarchiving via the API. If you do choose to add a CustomizeDiff
func, please document the behavior of going from true
->false
(unarchiving)
This should fix #73 |
Can we update the docs and get this merged? |
This was released in v1.1.0 |
`github_repository` - adding support for `archived` repositories
After some additional testing with this it appears repositories can only be archived through the API and not unarchived (whereas this is possible through the UI) - so this could do with some 🤔