3

I am using the following to search repositories by query name "android"

{
  search(query: "android", type: REPOSITORY, first: 50) {
    repositoryCount
    edges {

      node {
        ... on Repository {
          id
          name
          description
          forkCount
          owner{
            avatarUrl
          }
        }
      }
    }
  }
}

How to get the REPOSITORY subscriber count and the list of subscribers

Thanks In advance :)

misorude
  • 3,381
  • 2
  • 9
  • 16
Gowsik
  • 1,096
  • 1
  • 12
  • 25
  • Do you mean the number of people who [watch](https://help.github.com/articles/watching-and-unwatching-repositories/) the repository ? – Bertrand Martel Oct 28 '18 at 13:46
  • @BertrandMartel In the github V3 search there is subscribersUrl Links... something like that – Gowsik Oct 28 '18 at 18:09

2 Answers2

1

You are looking for watchers, the terminology used in v3 is subscribers, check this :

{
  search(query: "android", type: REPOSITORY, first: 50) {
    repositoryCount
    edges {
      node {
        ... on Repository {
          nameWithOwner
          watchers(first: 100) {
            totalCount
            nodes{
              login
            }
          }
        }
      }
    }
  }
}

Try it in the explorer

Bertrand Martel
  • 42,756
  • 16
  • 135
  • 159
0

The GitHub API itself has no notion of "subscriber" (at most, the number of clones, over the last 14 days)

GraphQL itself has the notion of subcription, as described here, but they are not for the "repository".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250