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 private field in github repo creation #42

Merged
merged 2 commits into from Sep 23, 2020

Conversation

dinosk
Copy link
Contributor

@dinosk dinosk commented Sep 18, 2020

Checks if the Visibility field is set to private, and sets the Private flag in the request object sent to go-github.

Fix: #44

@@ -248,6 +248,48 @@ var _ = Describe("GitHub Provider", func() {
getSpec := newGithubRepositorySpec(getRepo.APIObject().(*github.Repository))
postSpec := newGithubRepositorySpec(repo.APIObject().(*github.Repository))
Expect(getSpec.Equals(postSpec)).To(BeTrue())

// User repo case
// Generate a repository name which doesn't exist already

This comment was marked as outdated.


// We know that a repo with this name doesn't exist in the organization, let's verify we get an
// ErrNotFound
userLogin := os.Getenv("GITHUB_TEST_USER")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check for this env var up the top and bail if missing as is done w/ GITHUB_TOKEN

Copy link
Collaborator

@foot foot left a comment

Choose a reason for hiding this comment

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

Nice one 💯

@dinosk dinosk marked this pull request as ready for review September 23, 2020 11:04
@stefanprodan stefanprodan merged commit 482bbbe into fluxcd:master Sep 23, 2020
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.

UserRepositories are created as Public even when specified to be private
3 participants