Skip to content

Fix Code Scanning Alert tool field #1904

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

Merged
merged 3 commits into from
Jul 8, 2021

Conversation

ganeshkumarsv
Copy link
Contributor

@ganeshkumarsv ganeshkumarsv commented Jun 21, 2021

The tool field on the API response of listing code scanning alerts is a struct instead of a string. This PR fixes the alert tool field to a struct.
Github API: https://docs.github.com/en/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository

Deprecation notice from Github: The tool_name field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the tool field.
https://docs.github.com/en/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository

@google-cla
Copy link

google-cla bot commented Jun 21, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jun 21, 2021
@ganeshkumarsv
Copy link
Contributor Author

@googlebot I signed it!

@google-cla google-cla bot added cla: yes Indication that the PR author has signed a Google Contributor License Agreement. and removed cla: no labels Jun 21, 2021
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, @ganeshkumarsv !

@gmlewis gmlewis changed the title Fixes Code Scanning Alert tool field Add Code Scanning Alert tool field Jun 21, 2021
@codecov
Copy link

codecov bot commented Jun 21, 2021

Codecov Report

Merging #1904 (ce450a9) into master (75644ea) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1904   +/-   ##
=======================================
  Coverage   97.65%   97.65%           
=======================================
  Files         105      105           
  Lines        6786     6786           
=======================================
  Hits         6627     6627           
  Misses         86       86           
  Partials       73       73           
Impacted Files Coverage Δ
github/code-scanning.go 100.00% <ø> (ø)

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 75644ea...ce450a9. Read the comment docs.

Copy link

@stephengroat stephengroat left a comment

Choose a reason for hiding this comment

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

these might help

ganeshkumarsv and others added 2 commits June 21, 2021 19:12
Co-authored-by: Stephen <stephengroat@users.noreply.github.com>
Co-authored-by: Stephen <stephengroat@users.noreply.github.com>
@gmlewis gmlewis added the Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). label Jun 21, 2021
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, @ganeshkumarsv !
LGTM.

Awaiting second LGTM before merging.

@gmlewis gmlewis changed the title Add Code Scanning Alert tool field Fix Code Scanning Alert tool field Jun 21, 2021
@gmlewis
Copy link
Collaborator

gmlewis commented Jun 21, 2021

I apologize for the PR name changes. I see now that this is a "fix" and not an addition... and is therefore a breaking API change.

@gmlewis gmlewis requested a review from wesleimp June 22, 2021 13:39
@gmlewis
Copy link
Collaborator

gmlewis commented Jun 24, 2021

Friendly ping @wesleimp

@ganeshkumarsv
Copy link
Contributor Author

@gmlewis @wesleimp
gentle bump

@ganeshkumarsv
Copy link
Contributor Author

@gmlewis @wesleimp
Can we get one more review for the PR please? We are not able to use go-github because of the issue in Alert tool field.

@gmlewis
Copy link
Collaborator

gmlewis commented Jul 6, 2021

@gmlewis @wesleimp
Can we get one more review for the PR please? We are not able to use go-github because of the issue in Alert tool field.

Please feel free to have any contributor to this repo provide a code review and approval, and we will get this merged. Thanks.

Copy link

@Parker77 Parker77 left a comment

Choose a reason for hiding this comment

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

LGTM.

@gmlewis gmlewis merged commit 55353a5 into google:master Jul 8, 2021
gmlewis added a commit to gmlewis/go-github that referenced this pull request Jul 8, 2021
gmlewis added a commit that referenced this pull request Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). cla: yes Indication that the PR author has signed a Google Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants