Organization activity
What moved in an organization lately: pull requests opened and merged, issues opened and closed,
and — for the asking — discussions opened and commits authored.
The window is an option and the title says what it is, so the card reads as a rolling report
rather than a total that only ever grows.
?org=forge-guild&days=30&show=commitsRequired
Section titled “Required”| Option | What it is |
|---|---|
org | The organization’s login — the name in github.com/<org> |
Options
Section titled “Options”| Option | Values | What it does |
|---|---|---|
days | 1 to 365 | Days the window covers (30 by default) |
from | a year, a month or a day | The start of the window, instead of days |
to | a year, a month or a day | The end of the window, instead of days |
show | discussions_started commits | Draw these stats as well |
hide | prs_opened prs_merged issues_opened issues_closed | Leave these stats out |
show_icons | true false | Show an icon beside each stat (on by default) |
show and hide each take any stat the card draws; a stat named in both is left out.
Plus the common options.
The window
Section titled “The window”days counts back from today, both ends inclusive — so the default 30 is today and the 29 days
before it, and days=1 is today alone. It rolls: the card drawn tomorrow covers tomorrow.
from and to name a fixed window instead — ?from=2024&to=2024 is the whole of 2024, and the
title says so. Either end may be left open: to then means today, and from the 30 days before
to. A query naming days as well as either is an error.
Every end is a UTC date, which is all GitHub’s search qualifiers read. A card rendered just after midnight UTC therefore counts a today that has barely started.
What each stat counts
Section titled “What each stat counts”Each one is a search over the window, and each asks a different question of it — so they do not add up, and none of them is a subset of another:
- PRs opened were created in the window, whether or not they are still open.
- PRs merged were merged in the window, whenever they were opened.
- Issues opened were created in the window; issues closed were closed in it.
- Discussions opened counts discussions created across the organization’s repositories.
- Commits are commits authored in the window, by author date rather than push date.
A pull request opened in March and merged in April is counted by neither figure of a window covering only May, and by both figures of one covering both months.
The token it needs
Section titled “The token it needs”The issue rows need a token that can read issues: a classic token with the repo scope, or
see the organization cards for the others. GitHub
answers a token refused issues with pull requests, so the card checks what the search matched and
draws an error rather than two rows of pull request counts. Hide both rows to draw the rest of the
card from such a token:
?org=ORG_NAME&hide=issues_opened,issues_closedCommits cost an extra request
Section titled “Commits cost an extra request”GitHub’s GraphQL search cannot search commits, so show=commits adds a REST commit search:
a second request, against a much smaller allowance than the rest of the card uses.
Everything else rides on one GraphQL request and one rate-limit point, whatever show and hide
leave on the card.
Where that search is refused, the commits row is left out and the rest of the card still renders.
What the numbers can see
Section titled “What the numbers can see”A search answers what its token can find: a token that reads the organization’s private repositories counts those too, so two deployments can draw different numbers for one organization.