155 questions
0
votes
0
answers
57
views
How to get a list of commits that were force pushed using GitHub GraphQL API?
I have been trying to get a list of commits that were pushed to my repo using the --force push command.
I am doing this to identify which commits have potentially changed the history of the branch.
I ...
0
votes
1
answer
230
views
Github API graphQL - Get certain organization user organizationVerifiedDomainEmails
I am the admin of my github organization. I want to get organization member emails from their username. I have the following gh cli command that will give me all members, but I want a specific member.
...
0
votes
0
answers
81
views
GitHub GraphQL API authorization via Clerk - JWT template variables not working
I am trying to call the GitHub GraphQL API using Clerk's GitHub authentication on Next.js.
After the user logged in via GitHub (which works flawlessly), the API call to the GitHub GraphQL API is made.
...
0
votes
1
answer
49
views
requiredDeploymentEnvironments is not getting selected using graphql
I am trying to enable the below in the branch protection.
query
curl -X POST -H "Authorization: Bearer <PAT>" -H "Content-Type: application/json" -d '{
"query&...
1
vote
1
answer
410
views
Check if user is member of a github team using GraphQL
I'm trying to write a GitHub workflow that uses a github-script in which a GraphQL query determines if a user is part of an organization's team.
Using the GitHub GraphQL Explorer I've created this ...
0
votes
1
answer
384
views
Does GitHub's GraphQL API support filtering files/trees by basic things like name?
I'm using GitHub's GraphQL API to retrieve the directories and files within a repository, but I only need some specific subsets.
The repository I'm working with has a structure like:
- / #root
- /....
1
vote
1
answer
706
views
GitHub GraphQL API list all custom fields in ProjectV2
I'm using ProjectsV2 in Github, and since we don't have some pretty basic automations, I'm trying to write my own.
I need to get a list of all my custom fields in the project, so I can then use their ...
1
vote
0
answers
186
views
Can I query secret scanning alerts via GraphQL?
is there a possibility to query GH Advanced security secret scanning results through the GraphQL API? I can’t find any detail in the docs.
BR
3
votes
1
answer
3k
views
github graphQL API - how to retrieve issue's project items?
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&...
2
votes
0
answers
334
views
GitHub GraphQL API: Is a user suspended?
Working on GitHub Enterprise Server 3.8:
My user is no "site-admin", but on the GitHub Web-UI I see on a users profile if the user was suspended:
I also see that information, when I do a ...
1
vote
0
answers
375
views
How to get comment Node ID of a discussion in GitHub Action with GitHub GraphQL API
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 ...
0
votes
0
answers
211
views
Is there a programmatic way to get the "Tracked By" relationship for github issues
GitHub let's me create tasks lists in the issue specification like so:
- [ ] #1
- [ ] https://github.com/desktop/desktop/pull/1
which will create a special relationship called "Tracked In" ...
1
vote
0
answers
132
views
Using GitHub GraphQL API to Query Filtered Items in ProjectV2 by State
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 ...
0
votes
0
answers
319
views
Get team name of users approving pull requests
I am trying to fetch the team name of the users who have approved a pull request using the GraphQL API. I am looking forward to perform this operation in a single query. I am able to get the list of ...
1
vote
0
answers
118
views
How to create a commit, on newly created empty repository using GitHub Graphql API
GraphQL Query I used:
mutation CreateGitProfileRepo($name: String!, $description: String!, $homepageUrl: URI!) {
createRepository(input: {name: $name, visibility: PUBLIC, description: $description,...
0
votes
2
answers
417
views
Creating Github Organization using graphql
I tried below code to create organization using my github account getting error
mutation { createOrganization(input: { login: "besttestzzzz", admin: true }) { organization { id login } } }
{ ...
2
votes
0
answers
262
views
Hide discussion comment using GitHub graphQL api
In a github discussion I am pinging folks who have pending PRs to review and to make the discussion less noisy I want to hide all previous comments before posting new comments. Probably this hide ...
4
votes
1
answer
3k
views
Error message 'Resource not accessible by personal access token' when trying to perform mutation in Github GraphQL API
I'm trying to build a simple Android app to list random repositories and be able to add a star to certain repos. Every time when I try to do a mutation to add a star to a project using Altair I get ...
1
vote
3
answers
3k
views
How to lookup GitHub usernames by emails in a single GitHub API call?
I'm trying to look up the GitHub username for a few hundred users based on their email (which I pulled from the git log). Unfortunately I can't figure out how to do this without making a single call ...
0
votes
2
answers
227
views
How to update github graphql headers dynamically
class GithubGraphqlService
URL = "https://api.github.com/graphql".freeze
attr_reader :access_token
def initialize(access_token)
@access_token = access_token
end
...
2
votes
1
answer
207
views
Github graphql api search filter based on repo owner location
I am exploring Github's graphQL API, and I am new to this. In the below use case, I am trying to fetch the repos which are of Java and their owners are from the location "London". I have ...
0
votes
1
answer
110
views
How do I get type target?.history from GitHub GraphQL on defaultBranchRef
I'm trying to get the last commit with typesaftey but can't get past the history property because it can be an empty object, {}, null, undefined, or the actual object I want, Commit.
My GitHub GraphQL ...
1
vote
1
answer
41
views
See the size of the specific document in a specific branch of a repository
I want to determine the size of the file "foo" in the master branch of johndoe's "boo" repository.
Any suggestion?
I am using https://docs.github.com/en/graphql/overview/explorer ...
1
vote
0
answers
243
views
Get Blocked Users with GitHub GraphQL
I stumbled on GitHub GraphQL today and at first glance, it seemed to me I could do more with it than I already do with their regular RESTful API. I created some Adapters in my existing application and ...
0
votes
2
answers
4k
views
How to use orderBy for graphQL
I am trying to sort reservesUSD of nested object dailyPoolSnapshots In descending order by timestamp and return it's first value (in other words, return the latest entry).
I know almost nothing of ...
2
votes
2
answers
3k
views
Retrieve ALL Github issues of a specific Project using the GraphQL API
I've been trying to retrieve all GitHub issues of a specific project using their GraphQL API.
The problem that i have is that i need to specify in the items a first or last param it doesn't work. ...
1
vote
2
answers
469
views
GitHub REST and GraphQL API are returning different data
I am scraping some data from GitHub. The RESTful URL to this particular PR shows that it has a merge_commit_sha value: https://api.github.com/repos/ansible/ansible/pulls/15088
However, when I try to ...
2
votes
0
answers
346
views
GitHub GraphQL API doesn't return pull requests from user with private activity settings
I have a GitHub app that is authorized to access data from my workplace's private repository. I use the GitHub GraphQL API to search for each user's recent pull requests.
The pull request query works ...
2
votes
1
answer
1k
views
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 ...
3
votes
1
answer
1k
views
How should I provide authentication for the Github graphql API when making client side queries?
I'm trying to make a client-side request to the GitHub graphql API using Apollo Client, but there's a 401 authentication issue I haven't been able to resolve.
I've swapped out the query with one to a ...
1
vote
0
answers
484
views
GitHub App token not working for GraphQL API
I’m writing a workflow to add issues/PRs as project items to the projects beta. I was previously using a personal access token for the GraphQL API call, which worked successfully. However, using a ...
2
votes
1
answer
1k
views
In Github's GraphQL API how to get repositories that do not have a particular repositoryTopic?
With Github's GraphQL API I recently found "Github API: Getting topics of a Github repository" that mentions you can get a count of topics:
{
repository(owner: "twbs", name: &...
0
votes
1
answer
234
views
What does 'isLocked' field in the Repository object refer to in GraphQL API?
The GitHub GraphQL API documentation for the Repository object shows an isLocked field, which it describes with, "Indicates if the repository has been locked or not."
I can't find a ...
2
votes
1
answer
1k
views
GitHub Graph QL Authentication via a Github App
I am just wondering, did anyone manage to authenticate into the Github GraphQL API with using a Github App and how?
The purpose of this is to write a script that pulls information from Github with the ...
1
vote
1
answer
391
views
How to use go-vcr with githubv4 ? - getting httpClient Transport
Looking at the set up for go-vcr
// Start our recorder
r, err := recorder.New("fixtures/etcd")
if err != nil {
log.Fatal(err)
}
defer r.Stop() // Make sure recorder ...
1
vote
1
answer
314
views
Does Github GraphQL return commit parents in a particular order?
According to the documentation (https://docs.github.com/en/graphql/reference/objects#commit), the parents function returns "the parents of a commit." Are these sorted the same way as in git? ...
0
votes
1
answer
321
views
Github Automerge Failure Notification (API v4 GraphQL mutation enablePullRequestAutoMerge)
at my company we want to make use of the relatively new API feature "Automerge" (not through a UI but through an API call),
However we can't seem to find any documentation of a webhook (or ...
1
vote
1
answer
920
views
Query open pull requests in an organization created by members of a team?
Once a pull request is approved by any member of a requested team, it disappears from the GitHub dashboard, even if it lingers in an open state. How can we query using the Github v4 GraphQL the open ...
0
votes
2
answers
401
views
How to fetch all my repos with specific GitHub topic using graph API
I want to fetch all the repos, that I'm owner/contributor with specific topic.
I tried below this request. This returned, all my repos that I'm owner/contributor with all the topics.
{
viewer {
...
6
votes
4
answers
6k
views
How can I check if Dependabot is enabled for a Repo using Github APIs?
I've gone through Github Rest API v3 and Github GraphQL API v4 but I'm unable to find a resource/endpoint to check if dependabot is enabled via the API?
I've gone through loads of documentation but ...
2
votes
1
answer
2k
views
Github GraphQL list repo permissions for a Team
I am really struggling to get anything sensible out of the GitHub GraphQL api...
I want to get a list of repos and the permission levels for a team. So far I have
Q= """query {
...
0
votes
4
answers
2k
views
is it possible to squash commits via Github API?
I've successfully implemented automatic file creation/update via Github V3 Rest API, however the only downside is that for each file I have a commit.
There is a possibility to do the same for multiple ...
0
votes
1
answer
2k
views
How to get all comments along with issues with github graphql
I'am trying this get github issues by their ids through graphql endpoints
And tried this code
{
repository(name: "reponame", owner: "ownername") {
issue1: issue(number: 2) {
...
1
vote
1
answer
687
views
How can I pass multiple cursors to a single GitHub GraphQL query with multiple node ids?
I'm trying to batch my GraphQL queries to retrieve the data I need from multiple repositories with the same request, where each repository has a different cursor.
Assuming I have the IDs of 3 nodes ...
3
votes
1
answer
734
views
When should you not use GitHub GraphQL API?
Much has been written about the benefits of the GitHub GraphQL API. And this is a really great technology. The only thing I can't figure out is in what situations is it still better to use the good ...
-1
votes
1
answer
1k
views
Github GraphQL API link not fetching data through React Web App, Error Found
I want to create a react web app that outputs data from github with the GitHub graphql API. So I used a method that I used in creating a weather web app which still uses graphql and react but my app ...
3
votes
0
answers
2k
views
GitHub GraphQL search issues by repository
I would like to execute a query for issues in a specific repository using GitHub GraphQL. Here is what I have:
query MyQuery {
search(query: "repo:spring-projects/spring-boot in:title fonts&...
0
votes
2
answers
2k
views
GitHub GraphQL API returning forbidden when using access token from GithubAuthProvider
I'm using GithubAuthProvider with the added scope repo to get the user's access token which is later used to access the GitHub GraphQL API (the GitHub App has the permissions for Contents and Metadata ...
6
votes
1
answer
3k
views
ApolloClient v3 fetchMore with nested query results
I'm using ApolloClient 3 the GitHub GraphQL API to retrieve all releases from a repo.
This is what the query looks like:
query ($owner: String!, $name: String!, $first: Int, $after: String, $before: ...
3
votes
1
answer
193
views
In GitHub GraphQL, what is the difference between contributionCollection->totalPullRequestContributions and user->pullRequests->totalCount?
What is the difference between these two queries in GitHub GraphQL?
query {
user(login: "desai10") {
contributionsCollection {
totalPullRequestContributions
}
}
}
and
...