github-api

Github Graphql Filter issues by Milestone

穿精又带淫゛_ 提交于 2020-07-18 05:11:38
问题 I'm wrestling with Github's graphql api (while learning graphql) trying to get it to list all issues in a certain milestone. I can't figure out how to do that from the API docs. I can query issues and see what milestone they're in (sorry, names redacted): query { repository(owner:"me", name:"repo") { issues(last:10) { nodes { milestone { id title } } } } } I wish there was a way to say something like issues(milestoneID:"xyz") , or perhaps if Issue would define a MilestoneConnection (doesn't

GraphQL query to get file info from GitHub repository

≡放荡痞女 提交于 2020-07-05 10:41:05
问题 I would like to use GitHub repository for posts in my Gatsby site. Right now I'm using two queries, first to get the names of the files: { viewer { repository(name: "repository-name") { object(expression: "master:") { id ... on Tree { entries { name } } } pushedAt } } } And the second to get the contents of the files: { viewer { repository(name: "repository-name") { object(expression: "master:file.md") { ... on Blob { text } } } } } Is there any way to get information about when each file was

Github API call for user accounts

半腔热情 提交于 2020-06-25 17:24:13
问题 Hi I'm trying to get data from the Github API for users, the languages they programme in, their repos and the followers/follows they are connected with and their number. I've read through the documentation but haven't found anything specific to the query that I need. Currently, I've used this query to call https://api.github.com/search/users?q=location:uk&sort=stars&order=desc&page=1&per_page=100 However, this returns the account name, url and other things that aren't relevant to what I'm

How can I get last commit from GitHub API

为君一笑 提交于 2020-06-24 08:30:04
问题 Which is the best way to get the latest commit information from a git repository using GitHub API (Rest API v3). Option 1: GET /repos/:owner/:repo/commits/master Can I assume that the object 'commit' of the response is the latest commit from branch master? Option 2: GET /repos/:owner/:repo/git/commits/5a2ff Or make two calls, one to get the sha by getting the HEAD ref from master and then get the commit information using the sha returned. 回答1: It depends on your definition of "last". for a

How can I get last commit from GitHub API

纵饮孤独 提交于 2020-06-24 08:29:05
问题 Which is the best way to get the latest commit information from a git repository using GitHub API (Rest API v3). Option 1: GET /repos/:owner/:repo/commits/master Can I assume that the object 'commit' of the response is the latest commit from branch master? Option 2: GET /repos/:owner/:repo/git/commits/5a2ff Or make two calls, one to get the sha by getting the HEAD ref from master and then get the commit information using the sha returned. 回答1: It depends on your definition of "last". for a

Github Actions: [remote rejected] master -> master (shallow update not allowed), error: failed to push some refs

亡梦爱人 提交于 2020-06-17 08:04:10
问题 In my Github workflow, I am checking out two repositories. Subsequently I merge two directories of the workflow repo "repoA" with repo "repoB". When pushing to repoB, I get an error: From ../repoA * [new branch] master -> workspace/master Automatic merge went well; stopped before committing as requested [master cbd72fe] Update To https://github.com/username/repoB.git ! [remote rejected] master -> master (shallow update not allowed) error: failed to push some refs to 'https://username@github

Unable to implement check in my integration, getting 'map undefined' for create method of checks

。_饼干妹妹 提交于 2020-06-13 05:57:07
问题 I am trying to implement Checks into my GitHub app. My App is built with probot. I am just not able to implement the checks. I have tried going through the documentation which demonstrate ruby example that includes several different setups(not sure if required with probot). I just got confused with the example there. Below is the code that resides in my index.js : app.on('check_suite.requested', async context =>{ console.log('************------------ check suite requested') await context

Workaround to post comments from GitHub actions from forked repos

北城余情 提交于 2020-06-09 05:43:25
问题 I need to post comments to GitHub pull request after GitHub action completes, e.g. when a FOSS community member submits a PR. I know that when an action runs from a forked repo, the token has no write access to the parent repo, so it cannot post a comment. Are there any viable workarounds that people have found for this? 回答1: I couldn't find any ready-made actions, so here's a complete code to work around GitHub Actions' limitation, written in bash + jq + curl, and calling GitHub API directly

Workaround to post comments from GitHub actions from forked repos

倾然丶 夕夏残阳落幕 提交于 2020-06-09 05:43:08
问题 I need to post comments to GitHub pull request after GitHub action completes, e.g. when a FOSS community member submits a PR. I know that when an action runs from a forked repo, the token has no write access to the parent repo, so it cannot post a comment. Are there any viable workarounds that people have found for this? 回答1: I couldn't find any ready-made actions, so here's a complete code to work around GitHub Actions' limitation, written in bash + jq + curl, and calling GitHub API directly

How to get all commits in a Git tag through GitHub API

醉酒当歌 提交于 2020-05-27 04:12:45
问题 I have to fetch all new commits that were a part when a new tag was created on a Git repo. This needs to be done through GitHub API. For example the Git UI says Tagging Tag1 and has a sha associated with it... let's say the sha is : SHA1 Now how do I get all commits which happened or were a part of Tag1 through GitHub API? I want to store all these commits and perform some analysis on them. 回答1: Based on the clarification on your comment: I want to get all commits between this newly created