See the size of the specific document in a specific branch of a repository

37 Views Asked by At

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 to make the query.

1

There are 1 best solutions below

2
Canberk Sahin On BEST ANSWER

This query can be used to determine the size of a given document located in a branch of a repository that belongs to another person.

{
  user(login:"userName"){
    repository(name:"boo") {
      object(expression: "master:foo") {
        ... on Blob {
          byteSize
        }
      }
    }
  }
}