← Plugins
GitHub
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' unlesskindssays otherwise. Its title and body are outside input. - Outside pull request pushedNew commits on a pull request PDT didn't open (its head moved):
previousHeadis where it was. Checked every minute on the projects' GitHub repositories; outsiders' and bots' unlesskindssays 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' unlesskindssays otherwise. Its title and body are outside input. - GitHub workflow run failedA failed run of one GitHub Actions workflow (
workflow, its file or name) inrepo(else the project's), however it was started: on a schedule, by hand, by a push. Optionally only onbranchand for someevents. Checked everyevery(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) andurl. - Comment on a GitHub issueAdds a comment to a GitHub issue: by repo and number, or a ticket's linked issue (
unlinkedwhen 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:
unlinkedwhen it has none) ascompleted,not_plannedorduplicate(GitHub's Close as duplicate, of the issueduplicateOf). It addslabels(keeping the others) andcommentfirst. 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 inprojectwith the pull request's title, text, author and link, linked to it, so it is never made twice. Withoutcreate, a pull request with no ticket leaves bynone. Output:ticketId,ticketKey,pr(owner/name#12),stageandclosed(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). WithheadSha, only while its head is that commit (the one approved):refusedwithcodehead_movedotherwise. It never pushes to the pull request's branch: one that is closed, a draft or in conflict with its base leaves byrefusedwithcodeandreason, 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),commentorapprove, withbody(orfallbackwhen it comes to nothing). Its URL is{{steps.<id>.url}}. - Close a GitHub pull requestCloses a pull request without merging it, adding
commentfirst. 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 (defaultmain) with inputs, as PDT's GitHub login. The repository is the run's project's unlessreponames 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 withgithub.workflow.latestandsinceset to itsdispatchedAt. - 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 (defaultmain), however it was started (a schedule, by hand), and leaves by its state:passed,failed(withfailedJobs),running(queued or running),cancelled, ornonewhen there is no run.event,headShaandsincepick one run: the one a pull request's merge started (its head branch and commit), or the onegithub.workflow.runstarted (sinceitsdispatchedAt). - Read a GitHub pull requestReads a pull request by its head branch or its number and leaves by its state:
open,merged,closed, ornonewhen there is none. Output:number,url,title,state,merged,headSha. Withci(andbranch, 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 byfailedwithfailure(ciorqueue),ciUrlandfailedJobs. Between waits it polls one (a dry run takesdryRunPort, elseopenfor a branch,mergedfor 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; withtagPattern, the newest whose tag matches it,*any text, e.g.v*-beta.*), or the one taggedtag.foundwithtag,name,urlandpublishedAt;nonewhen there is none, or withnewerThanwhen 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 asYYYYMMDDorYYYY-MM-DD; without{date}, one published that day), the day's or a later one.publishedwhen there is one; beforedueBy(UTC)early; withonlyIfChanged(the default),unchangedwhen 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, elsealready), 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
versionandsha256, and opens a pull request on the tap (or withpush, commits to its branch).updatedwithversion,sha256,commitand the pull request'snumberandurl;unchangedwhen the cask is already at that version and checksum. The cask needs oneversion "…"and onesha256 "…"(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. AfterwatchFor(default 7 days) it stops looking and the item waits for you.cancelledwhen the run was cancelled before it was reported,nonewhen there is no such run,alreadywhen 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 withallJobs) as PDT's GitHub login, which needs the Actions write permission (else it fails: take itserrorport). Output:runId, theattemptit re-ran and the run'surl.nonewhen 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 inproject's repository. Output:repo,number,issue(owner/name#12),urlandticketKey.
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.