Questions tagged [github-api]

An API used to retrieve information about data on GitHub.

All API access has to be done over HTTPS, and accessed from the api.github.com domain. All data is sent and received as JSON.

Online resources:

3713 questions
1
vote
0 answers

Issue Retrieving Repo Tag by SHA with GitHub REST API

I've an issue with the "Get a Tag" API by the tag SHA. As example, retrieving the SHA from the repo's tag list API (ist-repository-tags), I'm not able to retrieve the detail of the tag providing the returned SHA. You can reproduce the issue using as…
Matteo
  • 37,680
  • 11
  • 100
  • 115
1
vote
1 answer

Verify if token not expired Github Oauth1

Hey i want know if github have a endpoint to verify if a access_token have expired ? I have tried this but i have a 404 error
1
vote
1 answer

Retrieve artifacts from public repository using PAT

I am trying to download the latest artifact of a repository I don't own. The API just gives me the following error: { "message": "You must have the actions scope to download artifacts.", "documentation_url":…
Qrashi
  • 81
  • 2
  • 7
1
vote
1 answer

How can I connect devtools::install_github() to gitcred in R

I am moving away from storing my github credentials in ~/.profile and trying to get them to work with the proper credentials manager (on MacOS Monterey 12.6). I can connect to a (private) repo using devtools::install_github("myname/myrepo",…
Ngwenyama
  • 175
  • 6
1
vote
1 answer

Python + Github REST API: Problems with the Update File Contents request

I'm getting a Status 400 from the Update File Contents Github API even though 400 isn't on the list of possible HTTP response statuses! My problem is that the content key needs to be base64 encoded. But when I convert the content to base64, the API…
SeaDude
  • 3,725
  • 6
  • 31
  • 68
1
vote
0 answers

Issue with Git blob API: 502 Server Error

I am reading a tree from a repository using Git tree API and creating all the blobs in another repository using Git blob API. But I am receiving 502 server error. This behaviour is intermittent. And, the probability of this failure on AWS Lambda is…
1
vote
0 answers

Unable to connect to GitHub Apps via SonarQube CE. It keeps returning Unauthorized

I am working on integrating SonarQube within my Organizations' CI pipeline, and getting last this huddle is the last step to doing that. I need help with the problem below: I am trying to connect my SonarQube Community Edition deployment to GitHub,…
1
vote
1 answer

Github Action : Stop the action if PR already exists

I am creating auto PR via GitHub action, So whenever a new push happens on dev branch. automatically a PR is created from dev to master I want to change: If already a PR exists ( master <- dev ) no need to run this action, so how can I check if…
sarvesh kumar
  • 183
  • 11
1
vote
1 answer

How to bulk migrate github repos from one organization to another?

Similar to How to clone all repos at once from GitHub?, I wonder if there is a clean, GitHub CLI set of commands or shell script, to take the local cloned repos and then upload them to another. My specific use case was to grab backups of my git…
VictorLegros
  • 380
  • 1
  • 4
  • 13
1
vote
0 answers

Accessing changed files for a pull request in pre build script before executing GitHub actions

I am trying to do user authentication if a pull request contain changes in certain folders. I am intending to do this even before GitHub actions are triggered using pre-build script. I am able to access the user information using the environment…
1
vote
0 answers

How do I query a GitHub Project V2 Item Order by Custom Field from GraphQL?

How do I get the order of items in a board view column from the API? I found the sortBy object in the ProjectV2 views, but I'm struggling querying the items ordered by fieldValue (position?). Would you mind helping me construct a query for the JSON…
1
vote
0 answers

How to get list of Organization using API from Github Enterprise server (self-hosted server)

I'm trying to get all organization from a self-hosted github enterprise server. I can get all organization from github.com cloud version using GET https://api.github.com/user/orgs but I don't know how to do it with self-hosted version. I tried…
BlackLotus
  • 318
  • 4
  • 12
1
vote
0 answers

List hidden commits still in Github but not Git (security leak)

AWS informed me of leaked account info in a Github repo. It gave me link to the corresponding commit. That commit seems to only be visible if you have the direct sha. I am trying to identify all the other commits that could also contain leaks. AWS…
Eric Darchis
  • 24,537
  • 4
  • 28
  • 49
1
vote
1 answer

GitHub API find all files with extension

I want to get links of all GitHub files with specific extension. I found out that I can use extension:bin to search for all *.bin files, URL https://github.com/search?q=extension%3Abin&type=Code I found Using GitHub API to retrieve files with…
mascai
  • 1,373
  • 1
  • 9
  • 30
1
vote
1 answer

search for a string in an unmerged PR in github

Is there a way to find the PR containing a code change from a list of unmerged PRs from all branches (even remote)? For example if one of my unmerged PRs had a string stackoverflow, how can I search for it in github?
Punter Vicky
  • 15,954
  • 56
  • 188
  • 315
1 2 3
99
100