← Plugins

GitHub

Dev · Built in

Pull requests, CI, issues and releases for projects on GitHub, as your GitHub login.

What it needs

A GitHub login: sign in from PDT, or paste a token.

Workflow triggers

Events that can start a workflow.

  • GitHub issue openedA new issue in a GitHub repository: the ones in repos (any repo PDT's GitHub login can read), else the projects' own. Checked every minute; the first look at a repository only records where it is.
  • Outside pull request openedA pull request PDT didn't open (not a ticket's branch) on a project's GitHub repository: from a fork, a bot such as Dependabot, or a collaborator (kind). The first look at a repository only records the ones already open. Checked every minute on the projects' GitHub repositories; outsiders' and bots' unless kinds says otherwise. Its title and body are outside input.
  • Outside pull request pushedNew commits on a pull request PDT didn't open (its head moved): previousHead is where it was. Checked every minute on the projects' GitHub repositories; outsiders' and bots' unless kinds says otherwise. Its title and body are outside input.
  • Outside pull request closedA pull request PDT didn't open was closed or merged (merged). Checked every minute on the projects' GitHub repositories; outsiders' and bots' unless kinds says otherwise. Its title and body are outside input.
  • GitHub workflow run failedA failed run of one GitHub Actions workflow (workflow, its file or name) in repo (else the project's), however it was started: on a schedule, by hand, by a push. Optionally only on branch and for some events. Checked every every (default 30 minutes); each failed attempt starts one run, and the first look only records where the runs are.

Workflow steps

  • Import a GitHub issueMakes a Draft ticket from a GitHub issue (its title, text, author and link), linked to it. When a ticket already links the issue nothing is made and the step leaves by exists: an issue is never imported twice. Output: ticketId, ticketKey, issue (owner/name#12) and url.
  • Comment on a GitHub issueAdds a comment to a GitHub issue: by repo and number, or a ticket's linked issue (unlinked when it has none). Its URL is {{steps.<id>.url}}.
  • Close a GitHub issueCloses a GitHub issue (by repo and number, or a ticket's linked issue: unlinked when it has none) as completed, not_planned or duplicate (GitHub's Close as duplicate, of the issue duplicateOf). It adds labels (keeping the others) and comment first. An issue already closed counts as done: nothing is changed.
  • The pull request's ticketFinds the ticket linked to a GitHub pull request (exists), or makes one (created): an external Draft in project with the pull request's title, text, author and link, linked to it, so it is never made twice. Without create, a pull request with no ticket leaves by none. Output: ticketId, ticketKey, pr (owner/name#12), stage and closed (Done or Won't do).
  • Merge a GitHub pull requestSets a pull request PDT didn't open to merge, as Merge does for an attempt's: auto-merge (GitHub holds it until the base branch's required checks pass) or the merge queue, with the strategy the repository allows (queued), or merged at once when GitHub can (merged). With headSha, only while its head is that commit (the one approved): refused with code head_moved otherwise. It never pushes to the pull request's branch: one that is closed, a draft or in conflict with its base leaves by refused with code and reason, as does a merge GitHub refuses.
  • Review a GitHub pull requestSubmits a review of a pull request as PDT's GitHub login: request_changes (the default), comment or approve, with body (or fallback when it comes to nothing). Its URL is {{steps.<id>.url}}.
  • Close a GitHub pull requestCloses a pull request without merging it, adding comment first. One already closed or merged counts as done: nothing is changed.
  • Run a GitHub Actions workflowStarts a GitHub Actions workflow by hand (workflow_dispatch) on a branch (default main) with inputs, as PDT's GitHub login. The repository is the run's project's unless repo names one. GitHub doesn't say which run it started: read what it makes (a pull request, a release) with the other GitHub nodes, or the run with github.workflow.latest and since set to its dispatchedAt.
  • Read a workflow's latest runReads the newest GitHub Actions run of a workflow (by its name, release, or file, release.yml) on a branch (default main), however it was started (a schedule, by hand), and leaves by its state: passed, failed (with failedJobs), running (queued or running), cancelled, or none when there is no run. event, headSha and since pick one run: the one a pull request's merge started (its head branch and commit), or the one github.workflow.run started (since its dispatchedAt).
  • Read a GitHub pull requestReads a pull request by its head branch or its number and leaves by its state: open, merged, closed, or none when there is none. Output: number, url, title, state, merged, headSha. With ci (and branch, its head) it reads CI too: an open one whose check failed on its head, or that the merge queue removed for failed checks, leaves by failed with failure (ci or queue), ciUrl and failedJobs. Between waits it polls one (a dry run takes dryRunPort, else open for a branch, merged for a number).
  • Read a GitHub releaseReads the latest published release (drafts and pre-releases don't count; with prereleases, the newest one, pre-releases included; with tagPattern, the newest whose tag matches it, * any text, e.g. v*-beta.*), or the one tagged tag. found with tag, name, url and publishedAt; none when there is none, or with newerThan when the latest is still that one. Between waits it polls for a release to be published.
  • Watch for a scheduled releaseLooks for a day's scheduled release: a published release (pre-releases included) whose tag matches tagPattern (* any text, ? one character, {date} the day as YYYYMMDD or YYYY-MM-DD; without {date}, one published that day), the day's or a later one. published when there is one; before dueBy (UTC) early; with onlyIfChanged (the default), unchanged when the branch has nothing the newest matching release or the latest release lacks. Otherwise it is missing: one Inbox item says so (once per workflow and day, else already), with Start it (start, e.g. to a step that runs the workflow) and Ignore (ignore), and it looks again every half hour: the item closes by itself once the release is published (published), or after about a day (expired).
  • Bump a Homebrew caskSets a Homebrew cask in a tap on GitHub to a release: downloads the release's macOS file for its sha256, sets the cask's version and sha256, and opens a pull request on the tap (or with push, commits to its branch). updated with version, sha256, commit and the pull request's number and url; unchanged when the cask is already at that version and checksum. The cask needs one version "…" and one sha256 "…" (one file for every Mac).
  • Report a failed workflow runPuts one Inbox item about a failed GitHub Actions run (runId) in the Inbox: its workflow, title, branch, what started it, its version or tag when it has one, its failed jobs and a link, with Re-run failed jobs (rerun) and Dismiss (dismiss). It looks at the run again every 10 minutes: the item closes by itself when a later attempt passes (passed), and a later failed attempt replaces it. After watchFor (default 7 days) it stops looking and the item waits for you. cancelled when the run was cancelled before it was reported, none when there is no such run, already when its attempt is in the Inbox already.
  • Re-run a workflow run's failed jobsRe-runs the failed jobs of a GitHub Actions run (runId; every job with allJobs) as PDT's GitHub login, which needs the Actions write permission (else it fails: take its error port). Output: runId, the attempt it re-ran and the run's url. none when there is no such run.
  • Create a GitHub issueOpens an issue in a project's GitHub repository, as PDT's GitHub login: from a ticket ({{trigger.ticketId}}; its title and description unless given, and the ticket links the issue), or in project's repository. Output: repo, number, issue (owner/name#12), url and ticketKey.

Ready-made workflows

  • Done closes the GitHub issue (installed with it)
  • Triage new GitHub issues (a template)
  • Cut a release (a template)
  • Report a missing scheduled release (a template)
  • Report failed workflow runs (a template)
  • Review outside pull requests (a template)
  • After a release (a template)

Tools

The PM can:

  • issue_createOpen an issue on the project's forgeasks you first

More in the docs: Plugins and connections.