Log inGet started
Package

pullRequest.module

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

world_vcs.pullRequest

The reads the pull request verbs (world.prView, world.prComment, world.prReview, world.prClose, world.prReopen, world.prChecks, world.prCheck) share, and the pieces of the text zm pr view prints.

  • worldOf(verb, worldGuid) answers the world a verb acts in: worldGuid, else the session world; it raises at the verb's caller when neither names one.
  • sourceOf(pull) answers the world and branch a pull request's work is on.
  • who(item, usernameField, idField) answers who wrote an item; text(item, text) answers its text as written, or quoted through the untrusted marking when another account wrote it.
  • checkLines(checks, out) appends one line per check.
local PullRequest = require("modules.world_vcs.pullRequest")
local sourceWorld, branch = PullRequest.sourceOf({ source_branch = "main", source_world = "w" })
assert(sourceWorld == "w" and branch == "main")
assert(PullRequest.who({ author = "acct" }, "author_username", "author") == "acct")