Hi
I’m trying to get some metrics on our organisations GitHub repos using the GitHub GraphQL API. One of the metrics I would like to get is the creation date of a branch. Is this possible with the GraphQL API?
My currrent query is
query {
organization(login: "MyOrgNameHere") { ... on Organization {
repositories(first: 10) { ... on RepositoryConnection {
nodes{ ... on Repository {
name
description
refs(first: 100, refPrefix: "refs/heads/") { ... on RefConnection {
branches: totalCount
nodes { ... on Ref {
name
associatedPullRequests(first:1 orderBy: {field:CREATED_AT direction: DESC}) {nodes { merged mergedAt state}}
target { ... on Commit {
committedDate
}}
}}
}}
}}
}}
}}
}
This query gets most of the metrics I want, however I can’t figure out how to get the branch creation date for each branch returned. Does anyone know how to get the branch creation date for each branch returned in the above query?