Skip to content
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

Set visibility directly #2410

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

littlelionking
Copy link

@littlelionking littlelionking commented Oct 3, 2024

#2151 but I won't delete my fork

Previously, when creating a repository from a template,
it sets the visibility to either `Public` or `Private` and then
edits the repo settings later to ensure the visibility is correct.
Now it sets the `Visibility` parameter instead.
@littlelionking littlelionking marked this pull request as ready for review October 3, 2024 14:47
@kfcampbell
Copy link
Member

I'm seeing failing integration tests as a result of these changes:

--- FAIL: TestAccGithubRepositoryVisibility (63.14s)
    --- PASS: TestAccGithubRepositoryVisibility/creates_repos_with_private_visibility (7.82s)
        --- SKIP: TestAccGithubRepositoryVisibility/creates_repos_with_private_visibility/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubRepositoryVisibility/creates_repos_with_private_visibility/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubRepositoryVisibility/creates_repos_with_private_visibility/with_an_organization_account (7.82s)
    --- SKIP: TestAccGithubRepositoryVisibility/creates_repos_with_internal_visibility (0.00s)
    --- FAIL: TestAccGithubRepositoryVisibility/updates_repos_to_private_visibility (7.07s)
        --- SKIP: TestAccGithubRepositoryVisibility/updates_repos_to_private_visibility/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubRepositoryVisibility/updates_repos_to_private_visibility/with_an_individual_account (0.00s)
        --- FAIL: TestAccGithubRepositoryVisibility/updates_repos_to_private_visibility/with_an_organization_account (7.07s)
    --- PASS: TestAccGithubRepositoryVisibility/updates_repos_to_public_visibility (13.22s)
        --- SKIP: TestAccGithubRepositoryVisibility/updates_repos_to_public_visibility/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubRepositoryVisibility/updates_repos_to_public_visibility/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubRepositoryVisibility/updates_repos_to_public_visibility/with_an_organization_account (13.22s)
    --- PASS: TestAccGithubRepositoryVisibility/updates_repos_to_internal_visibility (13.06s)
        --- SKIP: TestAccGithubRepositoryVisibility/updates_repos_to_internal_visibility/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubRepositoryVisibility/updates_repos_to_internal_visibility/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubRepositoryVisibility/updates_repos_to_internal_visibility/with_an_organization_account (13.06s)
    --- FAIL: TestAccGithubRepositoryVisibility/sets_internal_visibility_for_repositories_created_by_a_template (10.52s)
        --- SKIP: TestAccGithubRepositoryVisibility/sets_internal_visibility_for_repositories_created_by_a_template/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubRepositoryVisibility/sets_internal_visibility_for_repositories_created_by_a_template/with_an_individual_account (0.00s)
        --- FAIL: TestAccGithubRepositoryVisibility/sets_internal_visibility_for_repositories_created_by_a_template/with_an_organization_account (10.52s)
    --- PASS: TestAccGithubRepositoryVisibility/sets_private_visibility_for_repositories_created_by_a_template (11.44s)
        --- SKIP: TestAccGithubRepositoryVisibility/sets_private_visibility_for_repositories_created_by_a_template/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubRepositoryVisibility/sets_private_visibility_for_repositories_created_by_a_template/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubRepositoryVisibility/sets_private_visibility_for_repositories_created_by_a_template/with_an_organization_account (11.44s)
FAIL

Can you reproduce these?

@stevehipwell
Copy link
Contributor

@littlelionking do you have an issue documenting what is wrong with the current approach? Switching to the GraphQL client has a number of downsides and I can't see what it actually achieves here?

@littlelionking
Copy link
Author

littlelionking commented Nov 27, 2024

@littlelionking do you have an issue documenting what is wrong with the current approach?

925 was referenced in my PR from feb.

Switching to the GraphQL client has a number of downsides

Yeah, I would prefer if there was a rest api option.

Can you reproduce these?

Maybe I set something up wrong when I ran the tests. I'm not looking to use terraform-provider-github for this anymore. If it's failing for you, I'm fine with just closing the PR.

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.

3 participants