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 new Repository security advisories REST API #2866

Closed
gmlewis opened this issue Aug 13, 2023 · 6 comments
Closed

Support new Repository security advisories REST API #2866

gmlewis opened this issue Aug 13, 2023 · 6 comments

Comments

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 13, 2023

GitHub Blog post: https://github.blog/changelog/2023-08-10-get-repository-security-advisories-for-your-organization-via-rest-api/
Rest API docs: https://docs.github.com/en/rest/security-advisories/repository-advisories?apiVersion=2022-11-28#list-repository-security-advisories-for-an-organization

This would be a great PR for any new contributor to this repo or a new Go developer.
All contributions are greatly appreciated!

Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work.

Please check out our CONTRIBUTING.md guide to get started. (In particular, please remember to go generate ./... and don't use force-push to your PRs.)

Thank you!

@coderr01
Copy link

coderr01 commented Aug 13, 2023

@gmlewis I like to contribute. As per my understanding

  1. we need to add the functionality for GET : /repos/{owner}/{repo}/security-advisories
  2. Can you please elaborate where we are going to add that functionality and how we are authenticating to get the token ?

@gmlewis
Copy link
Collaborator Author

gmlewis commented Aug 13, 2023

Before I answer those questions, please read CONTRIBUTING.md and take some time to read through this code base and play around with it.

All your questions will hopefully be answered.

If you still have questions in a few days, let me know, but honestly if I walk you through the creation of this PR, then it would be more efficient for me to simply write the PR.

Consider this to be a fun learning experience and a challenge and you will learn a lot more by trying to figure out the answers than if I led you through the whole process.

Thanks.

@anishrajan25
Copy link
Contributor

@gmlewis I would like to pick this up. Could you please assign it to me?

@gmlewis
Copy link
Collaborator Author

gmlewis commented Aug 17, 2023

Thank you, @anishrajan25 !
It's yours.

@anishrajan25
Copy link
Contributor

anishrajan25 commented Aug 24, 2023

I was going through the API documentation here, when I identified that there is inconsistency between the API response and the response schema shared by github.

The documentation says that the response body will have the Submission field as:

"submission": [
      {
        "accepted": true
      }
    ],

While as per the response schema in the documentation it says Submission field would be as:

"submission": {
    "accepted": true
}

Have raised the same with github team a while back. Ref to GH Issue

@gmlewis By any chance are you aware of the actual schema for submission field?

For now I will take the submission as per the response schema and continue with the dev for the following 2 APIs:

@gmlewis
Copy link
Collaborator Author

gmlewis commented Aug 24, 2023

@gmlewis By any chance are you aware of the actual schema for submission field?

No, I'm afraid not, sorry.
Can you try out the API on a repo to see what actually comes back to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants