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

Use github search API for getting all user repos #122

Closed
wants to merge 2 commits into from

Conversation

dinosk
Copy link
Contributor

@dinosk dinosk commented Nov 1, 2021

Signed-off-by: Dinos Kousidis dinos.simpson@gmail.com

Description

Closes #65

Refactors the ListUserRepos method in the github client, to use the search API for getting public and private user repos.

Test results

➜  github git:(65-gh-return-all-user-repos) ✗ go test ${TEST_VERBOSE} ${TEST_STOP_ON_ERROR} -race -coverprofile=coverage.txt -covermode=atomic ${TEST_PATTERN}
Running Suite: GitHub Provider Suite
====================================
Random Seed: 1637110248
Will run 8 of 8 specs

••
------------------------------
• [SLOW TEST:8.734 seconds]
GitHub Provider
/Users/dinos/go/src/github.com/fluxcd/go-git-providers/github/integration_test.go:129
  should be possible to create an org repository
  /Users/dinos/go/src/github.com/fluxcd/go-git-providers/github/integration_test.go:258
------------------------------
••reconcile user repository: test-repo-241, failed, error: multiple errors occurred: 
- PATCH https://api.github.com/repos/dinosk-test-org/test-repo-241: 404 Not Found []
- the requested resource was not found

------------------------------
• [SLOW TEST:5.270 seconds]
GitHub Provider
/Users/dinos/go/src/github.com/fluxcd/go-git-providers/github/integration_test.go:129
  should update if the repository already exists when reconciling
  /Users/dinos/go/src/github.com/fluxcd/go-git-providers/github/integration_test.go:360
------------------------------
•
------------------------------
• [SLOW TEST:8.155 seconds]
GitHub Provider
/Users/dinos/go/src/github.com/fluxcd/go-git-providers/github/integration_test.go:129
  should be possible to create a pr for a user repository
  /Users/dinos/go/src/github.com/fluxcd/go-git-providers/github/integration_test.go:437
------------------------------

Ran 8 of 8 Specs in 26.634 seconds
SUCCESS! -- 8 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
coverage: 49.7% of statements
ok  	github.com/fluxcd/go-git-providers/github	28.390s

Signed-off-by: Dinos Kousidis <dinos.simpson@gmail.com>
Signed-off-by: Dinos Kousidis <dinos.simpson@gmail.com>
@dinosk dinosk marked this pull request as ready for review November 17, 2021 00:55
@souleb
Copy link
Member

souleb commented Nov 19, 2021

can we have it for org repo too, so we use same service everywhere?

@makkes
Copy link
Member

makkes commented Oct 14, 2022

@dinosk are you still interested in getting this PR merged?

@dinosk
Copy link
Contributor Author

dinosk commented Oct 15, 2022 via email

@souleb souleb closed this Jan 9, 2024
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.

Github doesn't return private user repositories
3 participants