Access
Reliant acts through the Reliant GitHub App, signed in as you. What it can do is the intersection of the App’s permissions and what you can see, and only in repositories where the App is installed. GitHub answers a repository the App cannot reach with “not found” rather than “forbidden”, so a not found error on a repository you know exists usually means the App is not installed there. A fine-grained personal access token is also accepted as a connection.Acting as the Reliant bot
An automation can instead write asreliant-labs[bot], the App itself, by choosing Reliant bot under Writes as when you create or edit it. The pull requests, comments and reviews then belong to the bot, so you can approve and merge what an agent opens. Reliant mints a token for the bot per call:
- It checks that your own account has push access to the repository (cached for ten minutes). The bot cannot do anything you could not.
- It looks up the App’s installation for that one repository. If the App is not installed there, the write fails and says so.
- It mints an installation token scoped to that repository and to only what the action needs:
issuesfor comments and labels,pull_requestsfor reviews and review replies,pull_requestsplus read oncontentsfor opening a pull request. It lasts an hour and is cached until shortly before it expires.
connection.
Actions
The four
app.*, users.search and user.get_by_id actions are what the value types below list their options from. The two app.* actions need a GitHub App user token (the hosted connection, or an oauth2 connection to a GitHub App), not a personal access token.
Use them as github/<action>@1. Repository parameters are owner and repo, the two halves of owner/repo.
Every action that creates or updates something returns the object’s id, its GraphQL node_id and its html_url, so a later step can refer to it or recognise it. The list actions follow GitHub’s pagination (up to 1,000 items; issue.search returns one page and takes page) and return {items: [...]}. Each item names its author by user (the login) and user_id (the number, which GitHub never reuses).
Value types
GitHub defines types a workflow input can have, so a form can offer the right choices instead of a text box. A value is a plain string;multi: true makes an input a list.
get_integration_schema github.repository.
Where the types come from. github.repository lists the repositories the Reliant GitHub App is installed on that you can see, not every repository your account can reach (repo.list_for_user). That is deliberate: it is the set GitHub events are delivered for, so a repository you can pick is one an automation can fire for. Each option carries whether you can push there, and when a workflow writes as the Reliant bot the picker warns about repositories where you lack push access, because the bot writes only where you can. A stored value that is no longer listed (the App was removed, the repository renamed) stays visible, marked as no longer reachable, until you change it.
Types on events. Event attributes carry types too: repository is a github.repository, label a github.label, and sender_id a github.user (the numeric id of whoever acted). A trigger can scope by an input of the matching type, and validation checks the two agree:
repository is one of the input’s values, so an event for any other repository is dropped before anything is recorded, and a scope with no values matches nothing. Mark the input required so it must be chosen when the automation is turned on; an automation missing it shows Needs setup. match entries combine: a literal (is_pull_request: "true") and an input scope can sit side by side, and the trigger’s filter still runs afterwards for anything a scope cannot say (drafts, labels, who sent it).
github.user values are numeric ids as strings, so trigger.sender.id in trigger.activation.params.trusted_ids works unchanged.
Labels: add and remove, don’t replace
issue.update sets the whole label list. Two runs that each read the labels, change them and write them back can undo each other. issue.labels.add and issue.labels.remove each send one request for one label and GitHub applies it on its own, so use them to claim a task (agent:in-progress) or release it. issue.labels.remove on a label the issue does not carry fails with not found.
Creating a pack’s labels
issue.labels.add creates a missing label, but with GitHub’s default color and no description. To set a pack up, create its labels first with labels.create; it is safe to run on every setup because GitHub’s “already exists” answer is treated as success and nothing about the existing label changes (use labels.list to read its color). Any other failure, such as a missing permission, still fails.
Pull requests are created without labels
GitHub’s API opens a pull request with no labels. Afterpr.create, add them with issue.labels.add and the returned number.
Merging is a workflow step, never an agent tool
pr.merge merges only from an action node in a workflow you write; no agent can call it, and pr.update cannot merge, whatever it is given. Its action is enable_auto (arm auto-merge), disable_auto, dequeue (leave the merge queue) or merge (merge now, or join the merge queue when the base branch requires one). enable_auto and merge need match_head_commit, the full sha of the head that was reviewed: if the pull request’s head is anything else, nothing changes and the step fails, so a push after the review is never merged. method is squash (the default), merge or rebase.
The Autopilot built-ins never call it: whether anything merges without a person is a decision you make by composing it into your own workflow. Approving stays available through pr.review.create with the APPROVE verdict.
Check runs come from the App
GitHub lets only an App write a check run, socheck_run.create and check_run.update work only in an automation that acts as the Reliant App (its acting identity); acting as its owner, GitHub answers 403. The bot’s token for them carries the checks permission alone. They are workflow steps, never agent tools: what a check reports about a commit is the workflow’s record, not something an agent may post about its own work.
A check is tied to one exact commit (head_sha is the full 40-character SHA), so a push leaves the new head with no passing run. A branch ruleset can require a check by name from the Reliant App. In a repository with a merge queue, the required check must also be reported on each merge group’s commit: trigger on check_suite.requested with branch starting gh-readonly-queue/, and report there.
GitHub’s Re-run button re-runs nothing for an App’s check: it sends the App that created the check check_run.rerequested (one check) or check_suite.rerequested (Re-run all checks), and the App runs it again. Trigger on them, match name (or app), and report a new check run on the event’s head_sha; the old run keeps its result. check_run.external_id is the id the run was created with, and conclusion is how the re-run run ended. The event’s time is when it arrived, since the payload carries only the old run’s timestamps.
Shipping: rules, comparisons, statuses and releases
branch.rules lists what GitHub will enforce on a branch before a push or merge lands there: each rule’s type (required_status_checks, pull_request, merge_queue, …) and its parameters, such as the required check contexts or the approving review count. Rulesets in evaluate or disabled mode are not listed, and neither is classic branch protection; branch.get’s protected covers both.
compare answers “is there anything to release since the last tag”: status, ahead_by, behind_by and total_commits, plus one page of the commits head has that base lacks, oldest first. Each commit is its sha, its author’s login and the first line of its message, capped at 300 characters; changed files are not returned (pr.list_files reads a diff). has_more says a later page holds more.
commit.statuses reads the older Status API that external CI posts to: the combined state and each context’s latest status. Check runs (GitHub Actions, Apps) are check_run.list; a required check may be either. It needs the App’s Commit statuses: Read permission, which Reliant’s hosted App does not request yet, so on the hosted deployment GitHub refuses it with 403 (“Resource not accessible by integration”) for now. A personal access token or a self-hosted App with that permission can use it today.
release.create and release.update publish what was shipped. They are workflow steps, never agent tools, like pr.merge. Acting as the Reliant bot, their token carries the contents permission alone.
Unattended runs
Automation runs have nobody watching them, so an unattended run is not handed an action that changes GitHub (the yes rows above) unless the workflow step names it in itstools. Read-only actions are always reachable. See Unattended by design.
Events
Each event’s payload is declared, so
get_integration_schema lists it and validation checks a trigger’s filter, inputs and prompt against it: reading a top-level key the event never carries (data.issue on an inline diff comment) is an error before the trigger fires. Lists of names, such as issue.labels and pull_request.labels, hold strings.
You can narrow a trigger with match, either to a fixed value (repository: acme/app) or to an input’s values (repository: {input: repos}, see Value types). Every event carries repository (owner/name), installation_id, sender, sender_id (the numeric id of whoever acted, which survives a rename) and action; individual events add more:
Boolean-like attributes are the strings
"true" and "false"; quote them in YAML.
Comments written by Reliant’s own bot never fire issue_comment.created or pull_request_review_comment.created, so a run that comments or replies as the bot cannot trigger itself. Comments from any other bot (Dependabot, a CI app, a review tool) do fire them: filter on trigger.sender if you want to ignore one. The bot is recognised by its numeric GitHub id, never its login; a deployment with its own App sets RELIANT_GITHUB_BOT_USER_ID to that bot’s id.
Pull requests from forks
In a public repository anyone can open a pull request from a fork, and its branch holds code nobody with access to your repository wrote. A trigger that runs that code (a test run, a build) or gives an agent tools on it should refuse such pull requests. Every pull request object says where its branch lives and who opened it:pull_request.head.repo.full_name(owner/name) andpull_request.head.repo.forkname the repository the branch is in. GitHub sends no head repository once the fork is deleted, sohead.repois then absent: test it withhas().pull_request.author_associationis how the author is associated with your repository:OWNER,MEMBERandCOLLABORATORhave access to it;CONTRIBUTOR,FIRST_TIME_CONTRIBUTOR,FIRST_TIMER,MANNEQUINandNONEdo not.
pull_request.base.repo carries the same two fields for the repository the pull request targets.
Your workflow’s own writes
Every other event a run can cause (a label it adds, a pull request it opens, a review it submits, a push it makes) does reach your triggers, and a workflow that writes to what it watches would otherwise hear itself. Reliant records each mutating GitHub action a run makes before it makes it, then attributes the webhook that follows. That istrigger.origin, and by default a trigger ignores events its own workflow’s runs caused:
The digest is of the whole body as written, before the recorded payload truncates long text, and ignores the line-ending and trailing-space changes GitHub makes. A write that provably failed (a 4xx) is not matched; one that may have been applied (a timeout, a 5xx) is.
An event Reliant’s GitHub App caused but no recorded write explains is
app: Reliant did it, run unknown. It is not treated as the workflow’s own, so the default lets it through; write origin_filter: "!trigger.origin.caused_by_reliant" to ignore it as well. See Telling your own writes apart for the full field list, origin_filter examples and the loop cap.
Writes an agent makes through its shell (gh, git push) are not recorded and look, to GitHub, like you. Do the writing in an action node, or a push’s Reliant-Run: trailer is the only thing marking it, and that can only be a reason to ignore an event, never to trust one.
What the GitHub App needs
These are the App’s settings, made once by whoever owns it. On Reliant’s hosted deployment that is Reliant.
The
labeled, unlabeled, reopened and review_requested actions arrive under the Pull request and Issues events, so they need no separate subscription. Without the Pull request review comment, Check run and Check suite subscriptions, those three triggers never fire; without Contents write, the bot cannot open a pull request or publish a release. commit.statuses additionally needs Commit statuses: Read; without it that one action is refused. After changing permissions, every installation has to accept the update before it takes effect.
Example: review each new pull request
Related topics
- Integrations overview
- Git & GitHub, for cloning and opening pull requests from a workspace
- Automations