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

Support Github Advanced Security repository settings #2133

Merged
merged 3 commits into from Oct 20, 2021

Conversation

asvoboda
Copy link
Contributor

@asvoboda asvoboda commented Oct 19, 2021

@asvoboda
Copy link
Contributor Author

asvoboda commented Oct 19, 2021

@gmlewis let me know if you'd like me to add any other tests other than the generated ones.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @asvoboda .
In addition to the minor tweaks I've requested, it would be nice to add the new fields to any existing tests just to test the marshaling and unmarshaling.

github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
github/repos.go Outdated Show resolved Hide resolved
@gmlewis
Copy link
Collaborator

gmlewis commented Oct 19, 2021

Please try not to use force-push in this repo's PRs because it makes it more challenging for reviewers to see what changed since their last code review.

@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #2133 (6c33d85) into master (fa34afa) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2133   +/-   ##
=======================================
  Coverage   97.78%   97.78%           
=======================================
  Files         112      112           
  Lines        9970     9976    +6     
=======================================
+ Hits         9749     9755    +6     
  Misses        154      154           
  Partials       67       67           
Impacted Files Coverage Δ
github/repos.go 98.66% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa34afa...6c33d85. Read the comment docs.

@@ -360,7 +360,7 @@ func TestRepositoriesService_Get(t *testing.T) {
mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testHeader(t, r, "Accept", strings.Join(wantAcceptHeaders, ", "))
fmt.Fprint(w, `{"id":1,"name":"n","description":"d","owner":{"login":"l"},"license":{"key":"mit"}}`)
fmt.Fprint(w, `{"id":1,"name":"n","description":"d","owner":{"login":"l"},"license":{"key":"mit"},"security_and_analysis":{"advanced_security":{"status":"enabled"},"secret_scanning":{"status":"enabled"}}}`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if there is a better place for this, or if you'd like a separate test.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @asvoboda !
LGTM.
Merging.

@gmlewis gmlewis merged commit 17a925b into google:master Oct 20, 2021
@asvoboda asvoboda deleted the advc-security branch February 1, 2022 18:14
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.

Support "security_and_analysis" repository settings
2 participants