Problem accessting GitHub API from CodeBuild

Hi there,

How can I access GitHub API from the bash script in the AWS CodeBuild (need to retrieve an info about a pull request)? I’ve installed OAuth App in the Github organization settings, got “Client ID” and “Client Secret”. Not sure what to do next with it. Can you help me please?

:wave: hello @olgasavchuk, and welcome to the GitHub Support Community!

While I can’t speak to the AWS CodeBuild portion of your question, I’d like to step back and let someone else from the community offer their input.

If it helps, I can offer some context around fetching a pull request from the GitHub REST API. Our team documented some code samples for making that request. Also, while you could use the client_id and client_secret to authenticate with the GitHub API, it may be more advantageous to creating a personal access token and sending it in a header instead to make your request.