Skip to content

GitHubProjects

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:176

The GitHub implementation of the projects capability, backed by Projects v2.

  • Projects

new GitHubProjects(graphql, opts, readCommitChecks?): GitHubProjects

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:184

GraphQLClient

ProjectsOptions

CommitChecksReader

GitHubProjects

readonly key: "projects"

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:178

Capability key, always "projects".

Projects.key


readonly providerName: "github" = "github"

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:180

Provider name, always "github".

Projects.providerName

addItems(_owner, board, items, template): Promise<AddedItem[]>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:593

Puts issues on the board (addProjectV2ItemById, the content id the issue’s node id) and sets Status and Priority through the single select update, only where the item has no value yet. A status or priority with no option on the board is reported in dropped; no option is ever created, so no value is cleared.

string

BoardSummary

BoardItemInput[]

BoardTemplate

Promise<AddedItem[]>

Projects.addItems


close(_owner, board): Promise<void>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:240

Closes the board; updateProjectV2 with closed: true is the only way, and reversible.

string

BoardSummary

Promise<void>

Projects.close


create(owner, name, template): Promise<BoardSummary>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:216

Makes a board. With template.source naming an open board it is copied (fields, options, views and automation rules, no items); otherwise the board is created and brought in line with the template.

string

string

BoardTemplate

Promise<BoardSummary>

Projects.create


ensure(_owner, board, template): Promise<EnsureReport>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:285

Brings the board in line with the template. Never deletes a field, option or view, and never sends an option list without ids. Stops (throws) when the status field cannot be read.

string

BoardSummary

BoardTemplate

Promise<EnsureReport>

Projects.ensure


find(owner, name): Promise<BoardSummary | undefined>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:208

The open board with exactly this name.

string

string

Promise<BoardSummary | undefined>

Projects.find


items(_owner, board, template, required?): Promise<BoardItem[]>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:477

The board’s issues and pull requests with their status, whether they are open and their open blockers. A second step then reads, one small query per issue, the pull requests that close each open issue a rule could still move (it has a status that is not done or blocked and no open blocker), each with the aggregate ci / Required checks state of its head commit. An issue whose read fails keeps no pullRequests and carries pullRequestsProblem instead.

With required (a repo with no aggregate) each open pull request’s checks is the verdict of those required checks on its head commit, read with one check-runs list per pull request (and its statuses only when a required context may be one); without it the read is the aggregate’s, exactly as before.

string

BoardSummary

BoardTemplate

SourceRequiredChecks

Promise<BoardItem[]>

Projects.items


list(owner): Promise<BoardSummary[]>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:195

Every board of the organization, open and closed.

string

Promise<BoardSummary[]>

Projects.list


move(_owner, from, to, template): Promise<MoveReport>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:545

Puts the open items of from on to with their status and priority, only where the target has no value; closed and merged ones stay, and are set to the template’s done status when theirs is not a done one.

string

BoardSummary

BoardSummary

BoardTemplate

Promise<MoveReport>

Projects.move


read(_owner, board): Promise<BoardState>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:250

The live board: statuses, other fields, views and automation rules.

string

BoardSummary

Promise<BoardState>

Projects.read


setStatus(_owner, board, key, status): Promise<LifecycleResult>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:526

Puts an item in a status; transitioned is false when it already is there.

string

BoardSummary

string

string

Promise<LifecycleResult>

Projects.setStatus


whoami(): Promise<{ boards: number; ok: boolean; }>

Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:674

A holocron doctor smoke check: how many boards the token sees in the configured repository’s organization.

Promise<{ boards: number; ok: boolean; }>

Projects.whoami