Tag: github-api
-
How to form a GitHub GraphQL API query to compare between branches, e.g., compare MASTER and SAMPLE_12 to get all commits for potential Pull Request?
0 Looking for a GraphQl query to search for a list of all commits when comparing between two branches on GitHub within a repository. For example, https://github.com/account-test/repo-test/compare/main…development will render all the commits, if any. How to get the list of all commits when comparing between two branches using the GitHub GraphQL API? I tried query…
-
github graphQL api – how to retrieve issue’s project items?
0 I am new to github graphQL API and I have been scrambling for a solution to the following problem, using github Entreprise Cloud: I have a repo "myRepo" containing an issue "myIssue" issue "myIssue" is added to a projectV2 "myProject", which is defined at organization level (not in a repo) project "myProject" contains a…
-
How to structure Github APIv4 Golang Query for specific release
0 Using https://github.com/shurcooL/githubv4 and I’m really struggling to pull back a specific Release for a gh repo. The below code block keeps returning nothing when there is a v3 release: var releaseQ struct { Repository struct { Release struct { Author githubv4.String } `graphql:"release(tagName:$tagName)"` } `graphql:"repository(owner:$repositoryOwner,name:$repositoryName)"` } variables = map[string]interface{}{ "repositoryOwner": githubv4.String("jacobtomlinson"), "repositoryName": githubv4.String("gha-find-replace"), "tagName":…
-
GitHub GraphQL fetch repositories that are not archived
5 Is there a way to fetch only the repos that are not archived? { user(login: “SrikanthBandaru”) { id email isHireable name repositories(first: 100) { # fetch only the repos that are not archived edges { node { name isArchived shortDescriptionHTML description descriptionHTML repositoryTopics(first: 10) { edges { node { topic { name } }…
-
Why does membersWithRoles not return all members of an organization?
0 Using GraphQL for GitHub, I cannot get the full set of members in an organization. Using this GraphQL query, I get 45 users: query {node(id: "#@#@#$@#$##$#@") { … on Organization { membersWithRole (first: 100) { totalCount nodes { login id name createdAt, updatedAt} }}}} and same with this one: organization(login: "OrgName") { membersWithRole(first:100) {…
-
How to get comment Node ID of a discussion in GitHub Action with GitHub GraphQL API
0 I’m working on a GitHub Action triggered on the comment of a certain discussion (say org/repo/discussions/6#discussioncomment-7349183) being created or edited. I’d like the action to reply the comment like "your pipeline is running here" with a link. Then I found that there’s only GraphQL way to add a reply like: mutation { addDiscussionComment(input:{ discussionId:…
-
Github GraphQL API Get all commits of a User
1 I’m trying to use the GitHub GraphQL API to get all the additions made by a user (additions can be found from their commits). I’ve been able to get the additions from pull requests, but I haven’t found a way to do the same for commits. How can I get all the commits from…
-
Using GitHub GraphQL API to Query Filtered Items in ProjectV2 by State
0 I’m attempting to use the GitHub GraphQL API to query filtered items in ProjectV2 based on their state. Here’s what I have so far, but I’d like to filter items in Issues or Pull Requests with a state of CLOSED or MERGED, or based on their milestone. Any help would be greatly appreciated. query…
-
Get git blame for full Github repository via api
2 I’d like to get the output of git blame <file> for all files in a repository recursively. I want to do this without cloning the repository first, by using Github’s GraphQL v4 api. Is this possible? I’ve managed to get a list of files via this query: query { repository(owner: "some owner", name: "some…
-
Using GraphQL to list all tags of a FFmpeg and search for releases
0 I’m trying to use GraphQL to get all tags of FFmpeg and later get the downloadUrl of each tag release. In the GraphQL Explorer, I used the following query: query { repository(owner: "FFmpeg", name: "FFmpeg") { refs(refPrefix: "refs/tags/", last: 100) { nodes { repository { releases(last: 100, orderBy: { field: CREATED_AT, direction: DESC}) {…