Skip to content
GitAudience

Stargazer sync

.md

How GitAudience reads the stargazers of a project's repository and the repositories they starred, how often, within which GitHub limits, and what happens to people who leave.

GitAudience reads two things from GitHub for each project: the stargazers of its repository, with their public profile, and the list of repositories each of them starred. The first gives the audience, the second the audience overlap with other repositories. Both are read by the worker, in the background, through the GitHub App of the repository’s account.

To browse and filter the people, see Stargazers.

The audience

The audience of a project is its stargazers, minus three groups:

GroupWhoWhere they go
SuspectsAccounts created less than 30 days before their first star, or with no public repository and no follower.Kept, and shown with Suspects. Left out of reports and of the agent. You can mark or unmark a person as suspect by hand.
People who removed their starNo active star on the repository any more.Kept, outside the audience: out of the reports and of the agent.
Deleted accountsGitHub confirms the account no longer exists.Kept, outside the audience.

Reports and the agent’s queue only take the audience.

Reading the repository’s stargazers

Settings › General of the orbit project: the repository acme/orbit, 1,240 stars on GitHub, synced today, with the Sync now button
Settings › General of the orbit project: the repository acme/orbit, 1,240 stars on GitHub, synced today, with the Sync now button

When it runs

  • Right after you create a project, while you go through the next setup steps.
  • Every day at 01:00 UTC, for each project whose GitHub App is connected.
  • When an owner clicks Sync now in Settings › General. While a sync of the repository runs, the button shows Syncing… and another one is refused (“A sync of this repository is already running.”).

Settings › General shows the last sync on the repository line:

ShownMeaning
Not synced yetNo sync has finished.
Sync running ({n} read)…A sync is running.
Synced {date}The last sync read the complete list.
Incomplete ({date}, {n} read)GitHub returned a partial list. New stargazers were added, nobody was removed.
Failed ({date})The sync stopped on an error.

What it reads

For each stargazer: the login, name, bio, company, website, location, X account, public email, account creation date, followers, public repositories and the date of the star. The location is turned into a country and a city when GitAudience recognises it.

The public organizations of each person are read by a separate task, every hour, 10 at most per person, and read again after 30 days.

When a stargazer changes their company, website, bio, location or email on GitHub, the next sync puts them back in the agent’s queue. A change in follower count alone doesn’t.

Additions and removals

The sync reads the list from the first page, 100 stargazers per page, and writes them in batches. New stargazers are added as each batch is written.

Removals only happen at the end, and only when the list is complete: the number read must be within 2 % of the count GitHub announces, and at least half the repository’s public star count. Otherwise the sync ends Incomplete, nobody is removed, and the Incomplete sync alert shows until a later sync reads the whole list.

A person who removes their star stays in the project, outside the audience. If they star again, they come back with their history.

A sync that is interrupted, by a restart for example, starts again from the first page at its next attempt.

Reading the starred lists

For each person in the audience, GitAudience reads the public list of repositories they starred. It reads by GitHub user ID, so a renamed account keeps its list and never picks up someone else’s.

RunWhenWhat it reads
New peopleEvery day, and right after each repository sync that added peopleThe whole list of people not read yet. This is also the first run of a new project.
IncrementalEvery month, except January, April, July and OctoberStars newer than the last read.
FullOn 1 January, 1 April, 1 July and 1 OctoberThe whole list again, which also finds removed stars.

A list can end in one of these states:

StateMeaning
CompleteThe whole list was read.
CappedThe list has more than 3,000 entries: GitAudience keeps the 3,000 most recent.
HiddenThe person hides their starred list on GitHub. Nothing is removed; it is tried again at the next full run.
PendingNot read yet.

Shares in the overlap reports are computed on complete and capped lists only. The report says how many lists are in each state.

When GitHub answers that an account doesn’t exist, GitAudience checks again by user ID before marking it as deleted. An account that only hides its list is never marked as deleted.

The first run

The first run of a new project can take a while on a large audience: it reads one list per stargazer. The Calibration step of the project setup shows its progress in batches, the requests used and the estimated time left. When the GitHub hourly quota is reached, it shows “Paused: GitHub hourly quota reached. Resumes automatically at {time}.”

Competing repos

Competing repos are public repositories you compare your audience with: a competitor, a complementary tool. They aren’t projects: GitAudience doesn’t read their stargazers, and looks for them in the starred lists of your own audience instead.

Manage them in Settings › Competing repos. The list shows:

ColumnWhat it shows
RepositoryThe name and description, or Looking up on GitHub… until GitAudience has found it.
StarsIts public star count.
Shared stargazersHow many of your stargazers starred it, and their share among the starred lists read so far.

Owners add one by its owner/name in Add a competing repository, and remove one with Remove. The project’s own repository and a repository already in the list are refused.

Adding one needs no new reading: the figures come from the starred lists already read. A competing repo that turns out private or missing is removed, with the Repository not found alert.

The competing repos also feed the Recent star on a competitor filter and column on Stargazers.

GitHub API budget

GitHub limits API requests per installation of the App, per hour. GitAudience tracks that limit for each installation, separately for the two APIs it uses:

  • GraphQL reads the repository’s stargazers.
  • REST reads the starred lists, the organizations and the repository details.

Projects on the same GitHub account share their installation’s budget. A project on another account has its own.

Starred lists stop while 1,000 REST requests are still left in the hour, so the other reads always have room. When a quota is reached, the task waits for GitHub’s reset time and resumes on its own. A repository sync waits at most twice; after that it ends Failed and the next daily sync starts again.

Note

A repository sync reads the whole list within the GraphQL quota of one hour. A repository with more than about 150,000 stars can’t be synced in this version.

The instance setting github_points_per_hour caps the requests GitAudience uses per installation and per hour, below GitHub’s own limit. It has no field in the console.

Alerts

Problems with the repository show as alerts at the top of the project’s dashboard, with a link to the settings to check. Each owner also gets an email when an alert is raised.

AlertCauseWhat GitAudience does
Incomplete syncGitHub returned a partial list.Adds the new stargazers, removes nobody, tries again at the next sync.
Repository not accessibleThe App can’t read the repository: deleted, transferred to another account or removed from the installation.Keeps the stargazers already read, stops updating them.
Repository is privateThe repository became private on GitHub.Stops reading it, removes nobody. GitAudience only works on public repositories.
Repository not foundA competing repo is private or doesn’t exist.Removes it from the competing repos.
Installation to fixThe App is installed on all repositories.Reads nothing until the installation is back to selected repositories.
Installation suspendedThe installation is suspended on GitHub.Reads nothing until it is reactivated.

See Projects for renamed and transferred repositories.