| title | Pull requests |
|---|---|
| nav_order | 9 |
How much of a pull request did coding agents write, with which models, and how did those lines fare in review? The GitHub Action reports each pull request to the server when it is opened, pushed to, reviewed and closed; the server matches the lines it adds against the lines agents added in uploaded sessions. No source code leaves GitHub or anyone's machine: both sides send hashes.
# .github/workflows/sessionly.yml
name: Sessionly
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, closed]
pull_request_review:
types: [submitted]
jobs:
report:
runs-on: ubuntu-latest
permissions:
pull-requests: write # to comment; "read" is enough with comment: false
checks: read # what CI said of the pull request's commits (see CI below)
statuses: read
actions: read # which workflow file each check is from, and which runs a merge's push started
steps:
- uses: KIvanow/sessionly/action@main
with:
url: https://sessionly.example.com
token: ${{ secrets.SESSIONLY_TOKEN }} # a token with the ci role
# The other files that hold Sessionly jobs, by your names (see CI below).
sessionly-workflows: sessionly-nightly.yml, sessionly-ci.ymlIt needs three things:
- That workflow.
- A token with the role CI, made on the dashboard's Team page and saved as the repository
(or organization) secret
SESSIONLY_TOKEN. A CI token can report pull requests and do nothing else (see People, tokens and sign-in). sessionly settings --line-hashes onon the machines whose sessions should count (see What an upload contains), andSESSIONLY_LINE_HASHES=onin the cloud environments (see Cloud sessions).
What to know about the workflow:
@mainfollows this repository's main branch. To decide yourself when the Action changes, name a commit instead (KIvanow/sessionly/action@<commit sha>), as this repository's own workflow does. The list, and a pull request's page, say when the repository's most recent report from the Action, or that named no reporter, is from an older one, and no report from the last 30 days came from the current Action or a newer one. The page names that most recent report's version. If the workflow pins the Action to a commit or tag, move that pin to a newer one. A re-run of that pin keeps the old version: push a commit on an open pull request, or start the workflow by hand with its number if it has been merged. With@main, re-run the job: it fetches the Action again. A pull request that was itself last reported by an older one says so, without asking for a change that a later report already shows was made. GitHub offers a run you start by hand only whenworkflow_dispatchis in the workflow on the default branch, and the changed file has to be there before you start it.- The job needs Node 20 or later on the runner, which GitHub's own runners have. It does not check the repository out.
- A problem (server down, token refused) is a warning on the run, not a failed check, unless
you set
fail-on-error. - Pull requests from forks get no secrets from GitHub, so the Action cannot report them; the run shows a warning that the token is missing.
- On GitHub Enterprise Server the Action uses the server's own address and API, as the runner gives them.
What review left is not the end of it: code is reworked after it is merged too. So a merged pull request's agent lines are counted again on the branch it was merged into, 7 days and 30 days after the merge. The server holds only hashes and cannot see that branch, so the Action does the looking, on a schedule:
# .github/workflows/sessionly-nightly.yml
on:
schedule:
- cron: "17 5 * * *" # once a day
jobs:
after-merge:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
contents: read # to read the files as they are on the branch
checks: read # what CI said of commits still pending (see CI below)
statuses: read
actions: read
steps:
- uses: KIvanow/sessionly/action@main
with:
url: https://sessionly.example.com
token: ${{ secrets.SESSIONLY_TOKEN }}
sessionly-workflows: sessionly.yml, sessionly-ci.ymlPut it in the same workflow file as the report, with if: github.event_name != 'schedule' && github.event_name != 'workflow_run' on the report's job, or in a file of its own; either way a
file that holds only Sessionly's jobs (see CI). A run started by a schedule, with no pr-number, does this and reports
no pull request; after-merge: true does the same in a run started any other way.
A scheduled run was chosen over a run on every push to the default branch because it is one run a day whatever the repository's traffic, and it still happens in a week when nothing is pushed. A push would start a run for every merge, most of which have nothing due.
Each run asks the server which merged pull requests are due, and for each the files its agent lines are in. It reads those files as they are on the branch now, all at the one commit the branch is at, and sends their lines as hashes; the server counts how many of the pull request's agent lines are in the same files. No source leaves GitHub, and the server sends no hashes out.
- The first count at or after each age is kept, and never changed. If no run happened on day 7, the next one stands for it and records how old the merge really was.
- Nothing is made up for the past. An age a pull request reached before the server began counting (when it was updated to a version that does, or when its organisation was created) is not counted. One merged 20 days before that gets its 30 days and not its 7.
- Only lines whose sessions are kept. The lines of a session deleted since cannot be told from anyone's, and are left out of both numbers.
- By file, as the rewrite rate. A line counts when it is in the same file, anywhere in it. A file that was renamed or deleted has none of its lines left.
- If the branch it was merged into is gone (others were stacked on it, and it was merged and deleted itself), the repository's default branch is read instead.
- Files are read fifty at a time, so a pull request of thousands of files takes tens of requests to GitHub. A run reads at most 20,000 files; the pull requests left over are still due at the next run.
- Known limit: a very large pull request is not counted. The files' lines go to the server in one request, which takes 32 MB at most: about 1.7 million tracked lines in the files the agents changed. Above that the server refuses it, nothing is kept, and each scheduled run reads the files again and warns that the pull request could not be counted. There is no way around it yet.
On the pull request's page the counts are rows of History ("30 days after merge: 498 of 520 agent lines still there"), and the tile Kept @30d after merge has the share.
Kept @30d says how much of the agents' work went after merging, not why. So the same scheduled run also reads the later commits on the branch each pull request was merged into, for 30 days after the merge, and the server says what each did to its lines: a revert, a commit that changed them as part of a fix, or rework (neither). This is the merge clock; a session's own Later commits are read on your machine from when the session ended, and the two are never added up.
The run needs the repository's history, so the job checks it out whole:
after-merge:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
contents: read # the files, and the history
pull-requests: read # which pull request a later commit came with
issues: read # the labels of the issues that one closes
checks: read # what CI said of heads still pending, and of merge commits (see CI below)
statuses: read
actions: read # which workflow file each check is from, and which runs a merge's push started
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: KIvanow/sessionly/action@main
with:
url: https://sessionly.example.com
token: ${{ secrets.SESSIONLY_TOKEN }}
sessionly-workflows: sessionly.yml, sessionly-ci.ymlHow it is read:
- The server names the merged pull requests whose first 30 days are not all read yet, the branch, and the files their agent lines are in and where later commits moved them. Only pull requests with agent lines, merged since 30 days before the server began reading them, are named. A session matched to one later, with lines in a file that was not read, has that pull request read again from the merge, and the later commits kept of it are worked out again; a run that was reading it meanwhile, without that file, leaves it as it is.
- The run reads that branch's history with git in the runner. A pull request is read from where the last run left it: the server keeps the commits the branch was at, and the run reads what has come onto the branch since, whatever the commits' own dates (a branch merged with a merge commit brings commits made days before; so does a push of commits made earlier). The first time, it is read from the commit it was merged as. With that commit not in the history, or after a force-push of the branch, it is read by date once (from a day before the earliest due to a day past the latest one's 30 days), and from where it is from then on.
- A commit landed when the branch's own commit that brought it in was made (for a merged branch's commits, the merge commit), and never before the pull request was last read; read by date, when it was committed. Either way no later than 5 minutes before the run: one made since, or by a clock ahead, lands then, and is read with the rest.
- For each commit that changed those files the run sends the lines it removed and added there, as hashes. A commit that removes any of them is read whole: a line it adds back anywhere was moved, not changed, and is followed to its new file. A commit of more than 100,000 lines (a vendored or generated tree) is not counted, nor is one of more than 5,000 files or 200,000 line hashes.
- For a commit that removes lines, GitHub is asked which pull request it came with: its branch,
title, the issues it closes and what its description says it reverts are read for what it
is. Only what they are read as leaves the runner (
fix_branch,bug_issueand the like), never the text. Withoutpull-requests: readthe run warns once and reads the commits without them (nofix_branch,fix_pr_title,revert_pr_titleorbug_issue). - A branch that is gone (a stacked pull request's, deleted after merging) cannot be read: the server is told, its pull requests are not named again, and they are counted nowhere, not even among those to reach. One renamed since is read by its new name, and is gone when that is not in the checkout. One that is on GitHub but not in the checkout, or cannot be read for another reason, is warned of, and the other branches are read; the server is told its pull requests were not read, and asks for them after the others from then on, so they hold back none. Without a checkout at all the run only notes that later commits were not read, and asks the server for nothing.
- The server walks the commits in the order they landed, against the lines each pull request still has: a line moved goes with the move, a commit that puts lines back (a reland) is the pull request's own, and a commit that came before the merge commit in the history (from a branch that was merged later) did not see the lines and is not counted.
- A commit counts when it removes at least 2 of the agents' lines that are not common ones (written by 3 or more sessions in that file, as the pull request was last matched), as for a session.
- A revert names the commit the pull request was merged as (
This reverts commit …), or its pull request saysReverts owner/name#12of this one, or its subject or its pull request's title says it is a revert and it takes at least half the agents' lines still there. A revert of a revert (Reapply "…") reverts nothing, unless its pull request says it reverts this one: it puts the lines back, and the revert shows as relanded. Down a chain of reverts, each named by the one after it, a commit at an odd depth reverts and one at an even depth puts back. Only aRevert "…"orReapply "…"subject, or git's ownThis reverts commit …as the first paragraph, names a commit it reverts: a squash message that lists a branch's* Revert "wip"does not. - A fix has a fix word in its subject (
fix,bug,crash,regression,typoand a few more; thefix-wordsinput, or the organisation's policy, changes them), afix:type, afix/branch, a fix word in its pull request's title, or closes an issue labelled a bug (bug-labels). A likely fix is one where at least half of what it removed was the agents'. - The lines a commit removed are split over the sessions that had them, as they are matched
now: a session with
kof thencopies of a line the pull request has getsk/nof each one removed. Matching again, or a session deleted, moves the split; the commit stays. - Of what a commit removed, only the hashes of the pull request's own lines are kept, by the file they were written in; the rest are dropped when the commit is read. Of where commits moved its lines, the server keeps the paths, which it names to the next run to read, and the commits the branch was read at for each pull request.
- The server keeps one reading of each pull request's lines, walked in the order commits landed, where the binary follows a session's lines along each history they are in. Mostly the two agree. Where two branches change the same lines and are then merged (merge commits, not squashes), the server may count a commit on one against lines the other one still has. What a merge commit changes itself (a conflict resolved by hand) is not read, by either.
- A request holds at most 500 commits, 500,000 line hashes and 100,000 files and moves.
- When GitHub allows the run fewer than 100 more requests, or more than 2,000 commits are to be
read whole, it stops, and the next run goes on from the branch's own commit before the one it
stopped at.
outcomes-since: 2026-08-01reads the later commits of pull requests merged since then too: unlike the lines still there, later commits are history, so they can be read late.outcomes: falseswitches this off.
What it means: a revert is a strong sign. "Changed by a fix" is linked, not caused: a fix commit that touches an agent's lines is mostly a fix of something else that changed them along the way, and a careful team writes more fix commits. Rework is churn, not a defect.
On the pull request's page, Later commits lists each with when it landed, why it is what it is, its lines and the agents', and whose sessions they were; a tile says what happened by 7 and 30 days. The Pull requests page has a Later commits table by tool, model, person, repository or day, at 1, 7 or 30 days: of the pull requests that reached that age and were read up to it ("4 of 9"), how many were reverted, and fixes and rework per 1,000 agent lines (in a group's row, a commit counted by the group's share of the lines it changed). A pull request counts under each group whose sessions had lines in it, and so does a commit; lines are split, so they add up. Below 10 pull requests a group says too few rather than a rate, and so does a CI share below 10 known. The model is the session's main one. Each age is of its own pull requests: at 30 days, those merged 30 days before the period chosen (to 30 days ago), so every one has had the time to reach it; a note above the table gives the days they were merged, to about a day. CI is of the pull requests merged in the period itself, whatever the age: they overlap an age's, but are not only those. A group with nothing at the age and no CI is not shown. In the list, a merged pull request has badges: reverted, 2 fixes (fix commits changed its agent lines by 30 days, or 7 if 30 are not read yet) and base red (its merge commit's checks failed).
Compare two sets two tools, models or repositories side by side, at the age chosen. Of two tools, it leaves out every pull request with lines of more than one tool, and of two models, every one with lines of more than one model, so that no pull request is in both groups and a comparison of them holds; the note above the table says how many were left out at that age. By tool, a session deleted since still counts for that, so its pull request stays of two; by model, its model went with it, so it is not counted: the pull request is of the models of the sessions still kept. Of two repositories nothing is left out (a pull request is of one), so a pull request may have lines of more than one tool. People are not compared, nor days.
For each share of pull requests (reverted, changed by a fix, changed by a likely fix) at the age, and apart, under a heading of its own, for red on arrival and base red after merge, which are of the pull requests merged in the period, it shows each group's share with its 95% interval (Wilson's), however few pull requests it has, and how the two compare, with a 95% interval too:
- too few to compare while either group has fewer than 10;
- neither had any, with how many each had;
- where one had none, the difference in percentage points, said no clear difference when the interval takes in 0 (Newcombe's, from the two Wilson intervals);
- otherwise the ratio of the first to the second, "Cursor: 1.82× Claude Code's (1.03–3.28)", or no clear difference with the interval, when it takes in 1 (MOVER-R, from the two Wilson intervals).
Whether a difference is clear goes by the interval as shown, rounded: when a bound is shown as 1.00 (a ratio) or 0 (a difference), it is never called clear.
Pull requests are counted, not lines or commits: one pull request's lines and commits go together, and an interval on them would be far too narrow. Lines changed by fixes per 1,000 are shown beside, and not compared. It is a description of these pull requests, not a ranking, and each row is a comparison of its own: of five, one may look different by chance, so choose the one that matters before looking. What else differs between the groups is not taken out: harder work may go to one agent more than another, repositories word their commits differently (which decides what is a fix), one person may write most of a group, and only lines of people who turned on line hashes are matched.
Download CSV gives the figures behind the table, one row for each group (by its key, such
as claude-code) and age, all three ages, and the total marked as such, in plain ASCII (any
other character written as \u and its code): the counts, each of the five shares with its
interval (also below 10, where the table says too few), fix and rework commits counted by each
group's share of the lines they changed (fix_commits_split, which add up across groups, where
fix_commits counts a commit once in each group it touched), the days each age's pull requests
and those of CI were merged, whether pull requests of more than one group were left out and how
many at each age, when it was made and by which server version (unreleased for a build that is
no release). The fix words are the Action's and are not in it. Grouped by person there is no CSV.
Did the agents' lines arrive with a red build, and did the base branch go red once they were merged? The Action reads what the checks and statuses on a commit came to, and sends a state and counts: never what ran or what it said, unless you ask it to name the checks that failed.
Three figures, none of them an age:
- Red pushes: of the heads a pull request was reported at (each push), those whose checks failed, out of those whose checks came out either way.
- Red on arrival: a session's lines arrived with the first head that brought one of them. The session is red on arrival when that head's checks failed. The Pull requests page counts pull requests: one is red on arrival in a group's row when any of that group's sessions in it is, and in the total when any of its sessions is; a pull request's page shows sessions. Of a line the pull request has several copies of, a session's copies are taken for the last to arrive (the earlier ones may be another session's, or a person's, as copies are shared out when a commit removes them). Worked out as the page is read, from the sessions' lines as matched now, so matching again, a session deleted, or a path hidden where a repository is shown moves it; the heads stay.
- Base red after merge: the checks the push of the commit the pull request was merged as started on its branch failed. Only those of GitHub Actions: a nightly run, a scan, a run someone started on the branch's tip months later, or the push of a release tag at the same commit says nothing of the merge; another app's checks and statuses on the commit count whenever they were made. One moment, read in the 7 days after the merge commit was first reported (a pull request reported long after merging has its 7 days from the report); not read by then, it is not known.
How CI is read:
- A commit is red when any check run concluded
failureortimed_out, or any status isfailureorerror; green when none did and the rest came out well (successandneutralare well); still running while any check has not finished, or waits for someone (action_required, as a first-time contributor's workflows do), or a status ispending, and still running when last read once that is what it says 7 days on, until a run reads it again; and none to go by when there is nothing else: no checks and no statuses, or every run cancelled (a concurrency group cancels the run before a push). Skipped jobs never count, in no direction. A workflow run that never had jobs leaves no check run, so it is read by the workflow run itself: waiting for approval or still queued is still running, one that failed to start is red; one that says it failed with no jobs (GitHub fails a run still waiting for approval when its pull request is closed) is left out, as nothing. None to go by is not green, and is in no figure; neither is a commit whose CI was not read, which the page tells apart from still running. - Sessionly's own runs are left out by workflow file. The Action asks GitHub which workflow
run each of a commit's checks is from (
actions: read), and leaves out the runs of the files that hold Sessionly's jobs: this run's own file, and the filessessionly-workflowsadds (sessionly-nightly.yml, or.github/workflows/sessionly-nightly.yml;nonefor no file at all). That holds whatever event the run is on, and for its earlier runs on the same commit (reported when it was opened, reviewed, closed: each a run). In a repository with no CI of its own, a head reads as none to go by, not green. So keep the Sessionly jobs in workflow files of their own, as the examples here are, and with them in several files, have each job add the others (the examples do, by their file names: use yours). A Sessionly job that has to sit in a CI workflow: on a pull request event, where this run's check runs are on the head it reads, a CI job of this run in its file is seen, and the file is then read but for the check runs named as this job (thecheck-run-idinput, which the workflow run fills in itself), with a warning once; on other events the file goes whole, so keep such a job out of the schedule andworkflow_runfiles, or setsessionly-workflows: none, which leaves out only this job's own check run and skipped runs. A reusable workflow runs as its caller's file: a caller that holds only Sessionly jobs is this run's own file, and needs no naming; one called from a CI file is the CI-file case. Withoutactions: read, only this job's own check run and skipped runs are left out, workflow runs that never had jobs are not counted, and the run warns once.ci-ignoreleaves out checks and statuses by name (deploy-*,codecov);ci-onlycounts only the ones it names, such as those required to merge; the organisation's policy sets either for every repository. - Of a merge commit, GitHub Actions check runs count only for the workflow runs its push
started on the branch (
actions: read; without it, the run warns once and the CI of merge commits is not known); other apps' check runs and the statuses on it always. A head is read whole. Of a merge, as of a head, a state that came out one way or the other is replaced only by a later read that came out the other way (a re-run); one still running, or with nothing to go by, does not replace it. - A head's checks are read when the pull request is reported, which is usually while they
are still running: the server then says which of its heads are still pending, and the same
run reads those too. They are read again when a workflow of your CI finishes, if the
workflow runs the Action on
workflow_run, and once a day by the scheduled run, which asks the server for the heads still pending (reported in the last 7 days) and for the merge commits of merged pull requests with agent lines whose merge commit was first reported in the last 7 days, not read yet or read while their checks were still running; after that a merge is not asked for again, and one read as still running by then has none to go by. - A pull request reported before version 0.5.0 of the Action has no heads kept: its next report keeps the head it is at, with all of its lines as arriving there.
To read a commit's checks once your CI has finished, add the workflows to a workflow_run
trigger and give the job checks: read, statuses: read and actions: read. The run reads the CI of the
commit that workflow ran on, and sends it for the pull requests the commit is in (asked of
GitHub: of this repository, or of the fork for a fork's commit, which this repository does not
answer for) and, when the commit is one a pull request was merged as and its push started that
workflow run, as its merge CI. A fork's pull request gets this only once it has been reported
(by pull_request_target, by hand, or with pr-number): a run on pull_request has no token
for a fork.
# .github/workflows/sessionly-ci.yml
on:
workflow_run:
workflows: [CI] # the names of your CI workflows
types: [completed]
jobs:
ci-done:
if: github.event_name == 'workflow_run'
runs-on: ubuntu-latest
permissions:
checks: read
statuses: read
pull-requests: read # which pull requests the commit is in
actions: read # which workflow file each check is from, and which runs a merge's push started
steps:
- uses: KIvanow/sessionly/action@main
with:
url: https://sessionly.example.com
token: ${{ secrets.SESSIONLY_TOKEN }}
sessionly-workflows: sessionly.yml, sessionly-nightly.ymlWithout checks: read and statuses: read the run warns once, CI is not known, and the rest
is not affected; without actions: read it warns once, leaves out only its own check run and
skipped runs, does not count workflow runs that never had jobs, and knows no merge commit's CI;
ci: false reads none. ci-check-names: true also sends the names of the
checks that failed on a red commit (at most 20, each cut to 100 characters), off by default
because names can carry the names of clients, environments or systems.
What it means: CI failing is linked, not caused. Tests are flaky, systems go down, and a red push may be red for lines nobody's agent wrote. Read the figures beside the later commits, and with "n of m" in view.
On the pull request's page, Pushes and CI lists each head with when it was first reported, what CI said of it and when that was read, and what it said of the merge; the sessions table says for each whether CI was red on arrival. The Later commits table of the Pull requests page has the three figures as columns ("3 of 12": the red ones of those whose checks came out either way, "too few" below 10), of the pull requests merged in the period, the same for every age, and says for how many pull requests CI is not known.
On a server with the ee feature outcome_policy, an admin sets for every repository at once the
words that make a fix (fix_words), the labels of a bug (bug_labels), and the checks CI leaves
out (ci_ignore) or alone counts (ci_only): PUT /api/v1/outcomes/policy (see
Editions and license). The Action asks for it once a run, when it reads later
commits or CI (GET /api/v1/prs/policy, which a ci token may), and uses each field the policy
sets in place of this workflow's input; a field it leaves null is the input's. The two of CI go
together: a policy that sets ci_ignore or ci_only sets both, so no repository leaves out by
name a check the organisation alone counts (sessionly-workflows, the workflow files of
Sessionly's own that are left out, stays each repository's). A notice names each input this workflow set that the policy
stands in for (one left to its default is not named). A check name in the policy is one name even
with a comma in it, as a matrix's has. A server without the feature, or from before it, sets
none, and the inputs are used; so does an Action released before 0.5.0, which does not ask, and
one whose request for it is refused (another 4xx, as from a proxy that does not let the address
through), which says so. When the policy cannot be read (the server in trouble: 5xx, 429, no
answer), nothing it decides is read that run, rather than read by other rules and kept so: it is
asked three times, waiting at most 30 seconds, then the run says so (the job fails only with
fail-on-error), and the next run reads it. Whether to send the names of failed checks (ci-check-names) stays each
repository's. Every repository's ci token can read the policy: keep out of it check names secret
to one. A change applies to the commits read after it: what was counted stays.
sessionly's own later commits, read on each engineer's machine, go by that machine's words,
not the policy.
On a server of your own with the ee feature outcome_alerts, an admin adds hooks: URLs that are
told, as each happens, of an agent-written pull request (one with an agent session's lines kept)
whose later commits come in.
revert: a commit that reverts its lines (counted, as on its page, and not relanded).base_red: the checks of the commit it was merged as failed (what came before on the branch is not known, so not "turned red").fixes:fix_countfix commits (3 unless set; likely fixes only withlikely_only) changed its lines within 7 days of merging: told once a pull request, when the last of them lands.
POST /api/v1/outcomes/alerts/hooks {"url": "https://…", "events": ["revert", "base_red", "fixes"]}
answers the hook's secret, once; at most 10 an organisation. An event is told when its own time
(when the commit landed, or the Nth fix; for base_red, when the merge was first reported) is on
or after the event was turned on for the hook and within 30 days, so a hook is not told of what
came before it, and a pull request read again, or matched again, tells nothing twice. A session
matched after the commits or the CI came in counts from then: the event is told then, if its own
time is still within those 30 days. The job looks every minute.
Each event is a POST of JSON. Every one has event, delivery, org and sent_at. All but
test have repo, number, url (the pull request's), merged_at, agent_lines and tools,
and then:
| Event | Also |
|---|---|
revert |
commit: {sha, url, kind, signals, landed_at, agent_lines} |
base_red |
commit: {sha}, the commit it was merged as; ci: {state, failed, total} |
fixes |
fixes: {count, likely, days}, the fix commits counted within days (7) of merging, and how many of them are likely |
test |
nothing more: sent by POST …/hooks/<id>/test |
Ids and counts only: no title, person, path, message or check name. Changed by a fix is linked,
not caused. Headers: Sessionly-Event, Sessionly-Delivery (the same at every attempt: a second
delivery of an event has the one id, so check it), and Sessionly-Signature: t=<seconds>,v1=<hex>,
the HMAC-SHA256 of <t>.<body>, keyed with the secret as the text it was answered as (64 hex
characters, not the bytes they spell). Check it before taking the body, and the time too:
import { createHmac, timingSafeEqual } from "node:crypto";
function signed(secret, header, body, now = Date.now() / 1000) {
const { t, v1 } = Object.fromEntries(String(header ?? "").split(",").map((p) => p.split("=")));
const want = Buffer.from(createHmac("sha256", secret).update(`${t}.${body}`).digest("hex"));
const got = Buffer.from(String(v1 ?? ""));
return Math.abs(now - Number(t)) < 300 && got.length === want.length && timingSafeEqual(got, want);
}A delivery goes only to an https:// address on the internet: an address in the URL, and every
address its name resolves to when sent, are checked, and the one checked is the one connected to.
A name only a network of its own has (localhost, one without a dot, .local, .internal and
the like) is refused when the hook is made. SESSIONLY_ALERTS_ALLOW_PRIVATE lets a server of your
own send to its network, and over http://, but never to a cloud's metadata address. A delivery
follows no redirect and gives up after 10 seconds. One answered 2xx is done. One that fails with
408, 425, 429, 5xx, a timeout or no connection is tried again after 1 minute, 5, 30, 2 hours, 6
and 12 (later, up to 12 hours, when Retry-After gives more seconds), so for about 21 hours, then
has failed; any other answer fails it at once.
A hook whose deliveries keep failing for 3 days (each failure within a day of the one before), or
answered 410, is turned off, and what it had waiting fails. PATCH it with "enabled": true to
turn it on: from then on, nothing of the time it was off. An event that is gone by the time it is
sent (no agent lines kept, its CI green again, the revert no longer counted or relanded) is
dropped. While a pull request is being read again from its merge, its revert or fixes wait, looked
at again every 10 minutes. GET /api/v1/outcomes/alerts/deliveries lists the last 50.
Nothing is sent after the license has lapsed past its grace: what waits then fails (license),
and the hooks stay readable. Once a license is installed again, those raised within the last 30
days wait again and are sent, and the failed merges of the time between are told, those still
within 30 days. A hosted service sends none.
| Input | Default | |
|---|---|---|
url |
(required) | Address of your Sessionly server. |
token |
(required) | A Sessionly token with the ci role. |
github-token |
the workflow's token | Used to read the pull request, and to comment if that is on. |
comment |
true |
Post the figures as one comment on the pull request and keep it up to date. Needs pull-requests: write; without it the run warns and the figures are on its summary page only. false for no comment. |
summary |
true |
Write the figures to the run's summary page. |
ignore |
see below | Files to leave out, separated by commas or new lines. |
other-names |
Names clones of the repository may still have as their origin, as owner/name separated by commas or new lines (20 at most): for example from before it was renamed or moved to another owner. |
|
backfill |
false |
For a pull request from before the Action was added: first report it as it was when opened, worked out from its commits, so what review changed can still be measured. See below. |
pr-number |
The pull request to report, when the workflow was not started by one. Or several: all for the latest ones, 20-60 for a range. See below. |
|
since |
90 days ago | With pr-number: all, how far back to go: a date such as 2026-01-31. |
after-merge |
false |
Count merged pull requests' agent lines again, 7 and 30 days after merging. A run started by a schedule, with no pr-number, does this without it. See After merge. |
outcomes |
true |
On a scheduled run, or one with after-merge and no pr-number (started by hand, say), also read the later commits on the branches merged pull requests went into, for 30 days after each merge. Needs a checkout with the whole history; false to count only after merge. See Later commits. |
outcomes-since |
With outcomes: also read those of pull requests merged on or after this date, though more than 30 days before the server began to. |
|
fix-words |
Words that make a later commit a fix, separated by commas, in place of the default list. The organisation's policy replaces it where it sets them. | |
bug-labels |
Words that make a linked issue's label a bug label, separated by commas, in place of the default list. The organisation's policy replaces it where it sets them. | |
ci |
true |
Read what CI made of the pull request's commits, when it is reported, on workflow_run, and on the scheduled run. Needs checks: read and statuses: read, and actions: read to tell Sessionly's own runs apart and to read merge commits. See CI. |
sessionly-workflows |
The other workflow files that hold Sessionly's jobs (sessionly-nightly.yml, or .github/workflows/sessionly-nightly.yml), separated by commas or new lines: their runs are left out of the CI it reads, with this run's own file's; none for no file at all. See CI. |
|
ci-ignore |
Checks and statuses to leave out, by name, separated by commas or new lines; * stands for any text. Sessionly's own workflow runs are left out by file (sessionly-workflows), not here. The organisation's policy replaces it where it sets either ci_ignore or ci_only. |
|
ci-only |
Count only the checks and statuses named here (as ci-ignore names them). The organisation's policy replaces it where it sets either ci_ignore or ci_only. |
|
ci-check-names |
false |
Also send the names of the checks that failed on a red commit (at most 20, each cut to 100 characters). |
check-run-id |
the job's own | The id of this job's check run, left out of the CI it reads. The workflow run fills it in; leave it. |
fail-on-error |
false |
Fail the job if the report cannot be made or sent. |
An input that is on or off takes true, yes, on or 1 for on, in any case; anything else
is off.
Outputs: lines (tracked lines the pull request adds) and agent-lines (how many a coding
agent wrote). A run that reports several (all or a range) sets neither: its figures, one
row for each pull request, are on the run's summary page.
ignore. By default: package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock,
Cargo.lock, go.sum, poetry.lock, uv.lock, composer.lock, Gemfile.lock, *.min.js,
*.min.css, *.snap and *.map. An entry is a file name, a path, or a pattern with *
(which also matches /). One without a / matches a file of that name in any folder; one with
a / is a path from the repository's root. A list of your own replaces the default one, so
to add generated files, repeat the defaults you want to keep.
The Action writes the figures to the run's summary page and posts them as one comment on the
pull request, which it keeps up to date and never repeats: it finds its own comment by a
hidden marker and changes it only when the figures did. A figure on every pull request changes
how people feel about being measured, so it is yours to switch off: comment: false.
The comment has: the share of added lines an agent wrote; lines added and lines by an agent; the lines per tool and model; for a pull request reported since it was opened, how many of the agent's lines from then are still there; and a note when a cloud agent worked on it and no session was captured.
Two things about it to know before you switch it on in a public repository:
- Its heading is a link to your server's Pull requests page, so the address given as
urlis shown on the pull request. - It shows Sessionly's mark, an image from
www.sessionly.dev, which GitHub fetches through its own image proxy.
The Pull requests page (admins and viewers) then shows, for the period, repository and state chosen:
- per pull request: lines added, how many an agent wrote and with which tool and model, how many of the agent's lines survived review, review rounds, and review comments by people and by bots (CodeRabbit and the like); and, under Later commits, what came of merged ones' agent lines, with what CI said of their pushes and merges;
- on a pull request's own page (its name in the list leads there): the sessions that wrote its lines, each a link to the session; its files, with how much of each an agent wrote; and its reviews and comments, a row for each reviewer under people, bots and the author (reviews, those asking for changes, comments on the diff, replies, comments in the conversation), and each one with who, when, which line, and a link to it on GitHub. What reviews and comments say is not sent to the server and not stored; and each head it was reported at with what CI said of it, and for each session whether CI was red where its lines arrived;
- by model: the same summed, so you can see whose lines get through review as written and whose take several rounds;
- review bots: each bot that reviewed these pull requests, and all people together: how many pull requests, comments on the diff, and the rounds that followed its feedback alone or with someone else's (see Rounds by who asked). Shown once a bot has reviewed one of them.
The list starts on merged pull requests. Open and closed ones are there once you change the state filter. The period goes by when a pull request was merged or closed, or for an open one when it was opened.
Figures that are behind. A pull request's lines are matched to sessions when the Action reports it, and again when a session that added some of them is uploaded later (the session was still going when it was opened, the machine was offline): the server then matches the pull requests of its repository that are open or were closed in the last two weeks (and not before the session started), that its person committed to, five at most: those with most of its lines, now or from an earlier upload. An upload that changes none of its lines, nor whose it is or where and when it ran, matches nothing again. The page and the history say so: one row for matching again until the next report, however many uploads it took. The comment on GitHub catches up at the next report. A session uploaded to a server of version 0.6.3 or older, or for a pull request closed longer ago, is not in the figures until it is matched again: Match again on a pull request's page, or Match these to sessions again above the list, matches the lines as last reported against the sessions the server holds now, without asking GitHub; the page says when that was last done. What only GitHub knows (reviews, comments, the title, new commits) comes with a report: run the workflow by hand for those. A pull request last reported to a server of version 0.5.0 or older has to be reported once more before it can be matched again.
History. Under the figures, each time they moved, and when a newer Action reported them as they were: when, what prompted the report, the figures then, and why (new commits, fewer commits, a session uploaded since, a session no longer matched, a newer Action and which version replaced which, a session whose lines changed, or that it was matched again and nothing new turned up). A session named there links to it. When the agent lines moved, the figure says what they were until this report. The counts after merge are rows here too, and stay however many reports follow.
A pull request's page has, beside its reviews on GitHub, the review commands run in its
sessions before and during review (/code-review and the like; see
Review runs): how many, at which effort, how many in the
cloud, the findings they reported, and what their subagents cost. They are of:
- the sessions matched to it: their runs that name no pull request, made before it was merged or closed (a session may go on to other work), and
- sessions of its repository (or its fork, or an old name of it) with a run that names its number, a review-only session with no line in it too, and
- sessions of its repository on its branch, for runs that name no pull request: a review
there is work on this pull request. Codex's
/reviewnever names one. A run made after the pull request was merged or closed is left out, since a branch's name can be used again. A branch such asdevelophas one pull request after another: a run there is left out of a pull request when it was made before the earlier ones on that branch (those with a lower number) were merged or closed, so it is of the one it was made for and not of those opened later. Two that are open on one branch at once, into different branches, each have it. A branch that is the one the pull request merges into is left out, and a fork's branch is the fork's, not a branch of that name in your repository. The branch is the one the session started on.
The page lists each run in the order they ran, as the pull request's iterations: run 2 of 5, how long after the one before it, its effort, cost and findings, and the session it ran in.
A run that names another pull request is that one's, and each run counts once. A run that was refused before it began (denied, or declined by you) is no review and is not counted; one that failed or did not finish is, and the page says so. A matched session with a run that names none, matched to other pull requests too, gives that run to each of them, and the page says so. The two sides are not added up: a run in a session and a bot's comments are different things. The cost of the runs is part of their sessions' cost, not on top of it, and is a floor: their subagents only. It is not a part of the pull request's cost that the two can be set against: that one is each matched session's share by its lines, and a session that only reviewed is not in it at all. A review in the cloud is billed apart and has none. The list has a Local column, and by model the runs per pull request. A matched session that was deleted since, that came from a Sessionly that did not count review runs, or that is a Codex session whose rollout was not there to read, is said to be not known.
The rounds of a pull request are one number. Beside it the page says whose feedback they followed: after bots only, after people only, or after both. The list has it as the title of the rounds figure, and the Review bots table sums it for each bot.
- A round is what it is for the rounds figure: review feedback (a review that comments or asks for changes, or a comment on the diff, a reply too, from anyone but the author) followed by a new commit. An approval and a comment in the conversation are not feedback.
- Its kind is that of the feedback before that commit, since the round before: all of it by bots, all of it by people, or some of each. The three always add up to the rounds figure.
- For one bot, a round is its own alone when nobody else gave feedback before it, no other bot either, and shared otherwise. For people, who are one row together, a round is theirs alone when only people did.
- To review is to submit a review or comment on the diff. A bot that only posts in the conversation (a preview's address, a coverage report) is not in the Review bots table.
- Comments on the diff in the table of reviewers and in the Review bots table are those that start a thread. Replies are counted apart: a bot that answers each of the author's replies has not found more.
Version 0.4.0 of the Action says whose feedback each round followed, from the commits' own times, as it counts the rounds. That is exact, and known for every pull request it reports, whenever it was first reported.
A pull request last reported by an older Action has its rounds counted and no word of
whose feedback each followed, and the page says the split is not known and gives no number.
Nothing the server has can tell it: when a commit was made is known only to the Action, and
the times its reports arrived would put feedback given between a commit and its push in the
wrong round. Its next report from 0.4.0 or later brings it. One that is merged or closed gets
no further report by itself: run the workflow for it (the pr-number input) to have it.
A pull request an older Action counted no rounds for has none of any kind, and that is known.
Reported by 0.4.0 or later and still not known means what the Action said was not kept
when it was last reported: the report went to a server from before the upgrade, or the run
stopped between the two reports backfill sends. Nothing newer is needed: its next report
brings it. The one exception is a pull request with more than a report may name (300 rounds,
50 logins in one round, or 2,000 in all): the Action names none for it, in any report, and
its split stays not known.
The Review bots table says for how many of a bot's pull requests the rounds are known, and counts rounds over those only. Its other figures are over all of them.
A pull request stored by a server from before this was worked out shows its reviewers on its own page at once. The list and the Review bots table have it once the server has gone through it: when it starts after the upgrade, within the hour after any later report an older server stored, and at Match again where its lines can be matched again. None of them asks GitHub.
Limits.
- A bot that posts through a person's account (with a user's token) counts as a person.
- A rebase that rewrites the commits' dates moves them after the feedback they came before: the rounds figure and its split both count such a rebase as a round.
- More comments or more rounds do not mean worse code: a careful team has more. Read them beside how many of the agent's lines survived review.
- A line is an agent's when a session added that line to that file, the session is by someone who committed to the pull request, and it started at most 90 days before the pull request was opened. A session that ran in the cloud counts when it ran on the pull request's branch instead: there the commits are the agent's own. Everything else counts as not an agent's: people without Sessionly, sessions uploaded without line hashes, what a shell command changed on a person's machine where that is not sure to be the agent's, generated files. So the agent share is a floor.
- Who committed is every author and committer address on the pull request's commits
(GitHub's own
noreply@github.comaside). A session is that person's when the email git was set up with on their machine is one of them; a session with no git email goes by the address of whoever uploaded it. A pull request whose commits carry no address at all is the exception: there every session in the repository counts. - A line that several sessions added goes to the one that started last, and one line of a session accounts for one line of the pull request.
- A common line, one that three sessions or more added to the same file (an import,
display: flex;), goes only to a session that also wrote a line of the pull request that is not common, or that added every line of a file of the pull request that has nothing but common lines. Otherwise it would go to an older session that once added it too, while the one that wrote it is not uploaded yet. - The file has to be the same one. A session that worked in a worktree (a folder under
worktrees/or.worktrees/, or a checkout elsewhere whose path ends with the file's path in the repository) is matched to the repository's file. - The repository is known to a session by its clone's origin. The pull request's own
repository, the fork its branch is in, and the names given as
other-namesare all tried. - Survived review compares the pull request as it was opened with how it ended: of the agent's lines it had at the start, how many are still in it. It is only known for pull requests the Action saw being opened (or could reconstruct, see below). A line that was reformatted counts as changed, unless only the whitespace at its ends did.
- A review round is review feedback (a review that comments or asks for changes, or a comment on the diff, from anyone but the author, bots included) followed by a new commit. An approval is not feedback, and neither is a comment in the conversation.
- A bot is an account GitHub itself calls one, or one whose name ends in
[bot]. - A cloud agent's pull request is recognised by who made its commits
(
noreply@anthropic.comfor Claude Code,cursoragent@cursor.comfor Cursor) and what its branch is called (claude/…,ccr-<8 hex digits>-…,cursor/…), or by a cloud session uploaded for its branch. If no session was captured for it, the page says so next to it: its lines then count as not an agent's, which is wrong in a way worth knowing about.sessionly install --repoin the repository fixes it for later ones. - Agent cost is what was spent getting the pull request to where it is, not what the lines
it still has cost. Every session that gave it lines at any time, when it was opened or in a
later push, is charged to it, and stays charged when review takes those lines out again: a
$10 session charged to this pull request alone, all of whose lines went in review, still
cost the pull request $10. So the cost
does not shrink during review, rewrites on the way to a few lines are in it, and so is a
session that only pushed review fixes.
- Two figures. The headline is everything spent, review rounds included. Under it, where they differ, is what the first version cost: what the sessions with lines among those the pull request was opened with are charged. A session that only pushed fixes afterwards is in the first figure and not in the second. A session that both opened it and fixed it up is in the second whole: the two are told apart by session, not by push.
- A session in several pull requests is split between them by the lines it gave each, and counted once: six lines in one and four in another is $6 and $4 of a $10 session. A line that is in several (one stacked on another, a release of what was merged before) counts in the one that had it first, and a later one is charged only for the lines that are new in it: a release pull request of work that earlier ones brought is charged nothing for it, and takes nothing from them. The one that had it first is taken to be the one merged first, and of those still open the one opened first: a line gets from one pull request into another by the first being merged into the other's branch. A pull request closed without merging comes after all of those: when it is done again as another, the new one is charged for the lines, and the closed one keeps only what was spent on lines that no merged or open pull request has. The split does not move when review removes lines or when a file is renamed. It moves when the session gives a pull request more lines, is uploaded with another cost or is deleted, when a pull request's head or base branch changes, when a line still in a pull request turns out to be another session's, uploaded later, and when the order of two pull requests that share lines changes: one of two open ones is merged or closed without merging, or one that was merged earlier is reported after the others (a backfill).
- Having lines in the pull request is what makes a session pay for it, whatever branch it began on. Codex, Grok and a Cursor cloud agent name one branch for a whole session (a local Cursor session names none), and that is often the branch the session started on and not the one its work ended up on: so the whole session is charged to the pull requests it gave lines to. This is a known limit: other work done in the same session is charged to them too.
- For Claude Code, other branches' work is left out. It says which branch was checked
out at every turn, so a pull request is charged what was spent on its own branch, and
what was spent on the branch it is based on: the planning on
mainthat led to it is part of what it cost. The record says how much was spent on a branch and not when, so this is all the session spent on the base branch, whether before the pull request's own branch was made or after: unrelated work done onmainin the same session is charged too, shared between the session's pull requests that are based on it. A branch can be one pull request's own and the base of others. Where its own pull request was opened first (the others are stacked on it), what was spent there is that one's. Where the others were opened first (a release fromdevelopof what they brought), it was spent on them, and is shared by lines between all of them: the release is charged for the lines that are new in it, and nothing moves off the others when it appears. What the session spent on any other branch is that branch's pull request's, or no one's. What it spent while no branch was named is shared between all its pull requests by lines: a missing name says nothing of where the work went. When a session has lines in a pull request and spent nothing on that pull request's own branch (the branch was renamed before it was pushed, say, a detached checkout, or the lines were picked onto another), the branch names are what is off there, not the work: that pull request is charged as the other agents' sessions are, its share of the whole session by lines, or what was spent on its base where that is more, while the session's other pull requests are still charged what their branches say. Where that comes to more than the session cost, the branch names are what is off again: the work of such a pull request was spent under another one's branch (a worktree on its own branch, say, while the turns ran from the checkout of an earlier pull request's, so all they name is that one's). Such a pull request keeps its share by lines, and the others are brought down, by what their branches say, to what is left (and with them what such a one was charged of its base above its share). A turn run from such a worktree names its branch, and then that pull request is charged what its branches say: the names cannot tell how much of its work they missed. A server charges the sessions it holds again, as it starts, when this way of charging changes, and every hour those an older one beside it, while it is replaced, charged again its own way. A report from an Action too old to say what the pull request is based on is taken to be based onmainormaster. A Claude Code session uploaded before turns were kept by branch is charged whole, as the other agents' are, until its machine uploads it again. - The cost of a line. Divided by the agent lines the pull request has now (of the sessions that have a cost figure, a line that is in two pull requests counting in the one that had it first), the cost gives the cost of an agent line. The cost of a line that got through review is what the first version cost, divided by the lines of it that survived. Review removing lines lowers no cost: it leaves fewer lines to divide by, so this figure goes up. That is the sign of money that bought less. When no line of the first version is left there is no figure, and the tile says what those lines cost. A line that was opened in two pull requests is paid for in the one that had it first, and counts as surviving there while either keeps it: between them it is one line, paid for once, wherever it ended up. The summary of several pull requests divides what their first versions cost by the lines of them that survived, each counted once, which is the same sum each page does; where that is not how many survived (a line in two of them is in each one's count), the "Agent lines that survived review" tile says what it is beside them, and why.
- What a session gave a pull request is kept on the server as the hashes of those lines, and review taking lines out does not make it less. There is no history of pushes: a line that went from the files stays with the session it was last put down to there, and which lines those are is kept beside the session's others. A line that is still in the files, or in the first report, follows the matching, so one put down to an older session before the session that wrote it was uploaded moves to that one when it arrives, and its charge with it. A session's own line that moved to another file, or whose file was renamed, is the same line and is not counted again. Pull requests from before this was kept are charged once after the upgrade, from the lines they have now and the lines they were opened with: lines that came and went between those were never kept, so a session that gave only such lines is not in them. Their costs are not frozen at what they were: they are worked out again under this rule, and for a while a pull request not charged yet says so in place of a cost.
- Known limits: the same line written by several sessions. A line is known by its
file and its text, so two copies of one line in one file cannot be told apart, and the
server sees reports and uploads one at a time, not what happened between them. Where
several sessions wrote the same line in the same file (a closing brace, an import), which
of them keeps a copy that review took out can depend on what arrived first, the push or
a session's upload, and on whether the copies went in one push or in several. None of
this changes what a session cost. A line is counted for one session more or one fewer
than wrote it, and with it a share of that session's cost moves between the pull
requests the session is in; a session that gave only such a line may be left out of
the pull request:
- A session's line that review took out, and that another session then writes again in the same file: where the push arrives before that session is uploaded, the line is put down to the first session for a moment, and it no longer keeps the one that went.
- A second copy of a line the pull request was opened with, taken out one push after the other: both stay the session's, and when a session uploaded later turns out to have written the opening line, that line is counted for both.
- A line the pull request was opened with that the matching gives to one session, while the same line in the files is another's (the second began after it was opened): both count it while it is there, and the second does not keep it when it goes. The same holds where the opening line is no session's. Where the first session keeps an earlier copy of the line that went, the second does keep its own; if a third session then turns out to have written the opening line, the line is counted for all three, though the file never had it more than twice.
- A session that moved a line it was opened with to another file, after which another session writes the same line where it was and that goes too: that copy is not kept.
- A copy that review takes out in the very report that first puts a session's lines down to it (the session was uploaded after the push that brought them, and before the pull request was matched again) was never kept as that session's.
- Where the figures above the list stop. A pull request closed without merging keeps its cost on its own page and is left out of the figures above the list, unless only closed ones are shown; the tile says how many were. The Overview puts the same money in three places: pull requests that are merged or open, ones closed without merging, and no pull request at all.
- Three things to read with it. It is the cost of the matched sessions, not of
making the pull request: lines that are not an agent's carry none. It is a floor
when a session has no cost figure, has one that leaves out requests to models without a
known price, or was deleted since, and then reads "at least"; the total above the list
is one too when a pull request with agent lines was last reported before its sessions
were kept. And it is an estimate, marked
~, when any of those sessions' costs is, or when a session is split with a pull request that did not keep which lines are whose (Match again there settles it). A session that is deleted takes its lines and its charge with it, from every pull request it was in: the pull request keeps how many lines it had, not which. The Action's comment does not show the cost.
- By model is a description, not a ranking. Harder work goes to stronger models, a pull request with two models counts under both, and a handful of pull requests says little.
- The model is known per line for Claude Code, and for Cursor turns the hooks saw; otherwise the session's main model stands in, or it is shown as not known.
GitHub offers a run you start yourself only when the workflow on the default branch has
workflow_dispatch. That is how a merged pull request is reported again after the Action's
version changes: give its number, and leave backfill off, because the server already has its
first report. The same run, with backfill, reports a pull request from before the Action was
added, as it was when opened:
# in .github/workflows/sessionly.yml, beside the report job
on:
workflow_dispatch:
inputs:
number:
required: true
jobs:
report:
runs-on: ubuntu-latest
permissions:
pull-requests: read
contents: read # backfill compares commits
checks: read # what CI said of its commits (see CI)
statuses: read
actions: read
steps:
- uses: KIvanow/sessionly/action@main
with:
url: https://sessionly.example.com
token: ${{ secrets.SESSIONLY_TOKEN }}
pr-number: ${{ inputs.number }}
sessionly-workflows: sessionly-nightly.yml, sessionly-ci.yml
backfill: true
comment: falseWith backfill, the Action first reports the pull request as it was when it was opened: its
commits up to a minute after that time, and the files they changed. The server keeps the first
report it gets of a pull request, so this changes nothing for one it already knows. Where it
does not work:
- After a rebase or a squash of the branch, the commits all carry a later date and no longer say what was there at the start.
- When nothing was pushed after the pull request was opened, no report "as opened" is made, and the pull request's survived-review figure is shown as not known, although it is as it was opened.
Several in one run. pr-number also takes all, for the pull requests created since
since (90 days ago unless given), the latest first, or a range such as 20-60. One run
reports at most 100; when there are more, its warning names the range to give next, which
holds the rest of them and none from before since. A range you write yourself takes no notice
of since. When GitHub allows the run no more requests, it stops and names the range to give
later.
Such a run posts no comments, and a number in a range that is an issue is passed over.
To the Sessionly server, for the pull request: repository, number, title, link, who opened it,
state and dates, the email addresses on its commits (used to pick whose sessions count; the
server keeps a hash of each, not the address), counts of commits, reviews and review comments, and per changed file its path and a
hash of each added line that has a letter or digit (the first 8 bytes of the SHA-256 of the
line without the whitespace at its ends, as the sessionly binary makes them).
For each review and comment: who made it (their GitHub login, and whether that is a bot), when, the file and line it is on, a review's outcome, and its link on GitHub, which is what the pull request's page in the dashboard leads to. What a review or comment says is never sent. For each round of review: the logins of those whose feedback it followed, and whether each is a bot. They are the logins of reviews and comments as above (of all of them, also where a pull request has more than the 2,000 that are sent); nothing else is said of a round.
For a count after merge: the repository, the pull request's number, and for each file the server asked about, its path and a hash of each of its lines as it is on the branch now.
A report also names the pull request's head commit and, once it is merged, the commit it was
merged as (their SHAs, which anyone who can see the repository sees). For later
commits: the branch's name and the commit it was read at, and for each pull
request read the commits it was read from and up to (SHAs); each commit's SHA and when it
landed; the numbers of the pull requests it belongs to and of those it says it reverts; the
SHAs its message says it reverts; which of the due pull requests it is a later commit of; for
the files the
server asked about, a hash of each line it removed or added; and where it moved lines, the
path of each file they went to and their hashes. The numbers of pull requests merged into a
branch that is gone. What it is goes as ids (fix_message, fix_conventional,
revert_subject, fix_branch, fix_pr_title, revert_pr_title, bug_issue). Read in the
runner and not sent: commit messages, the title, branch name and description of a commit's
pull request, and the labels of the issues it closes. The server keeps the hashes of the pull
request's own lines a commit removed, the paths of the files its lines were moved to (which it
names to later runs), and those SHAs; the other hashes are dropped at once. The link to a
commit is made by the server from the repository and the SHA.
For CI: for each commit read (a head the pull request was reported at, or the one it
was merged as), its SHA, a state (success, failure, pending or none), how many checks
and statuses failed, how many there were, and how many were cancelled; with a report, on
workflow_run, or on the scheduled run. The names of the checks that failed only with
ci-check-names: true, at most 20 of 100 characters. What ran, what it said, and the names
otherwise are read in the runner and not sent; the check names an admin sets in the
organisation's policy are kept on the server, which the Action reads. The server keeps, for each head, the hashes of
the pull request's own lines that were new at it (hashes it holds already), so it can say
with which push a session's lines arrived.
Limits: a report has at most 5000 files and 500 commit addresses. Of reviews and comments the latest 2000 are kept, and the pull request's page says when there were more. A changed file that GitHub gives no diff for (it is too large) is not counted; the comment and the page say how many there were.
The endpoints behind all of this are in the API reference.