GitHubProjects
Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:176
The GitHub implementation of the projects capability, backed by Projects v2.
Implements
Section titled “Implements”Projects
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new GitHubProjects(
graphql,opts,readCommitChecks?):GitHubProjects
Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:184
Parameters
Section titled “Parameters”graphql
Section titled “graphql”GraphQLClient
readCommitChecks?
Section titled “readCommitChecks?”CommitChecksReader
Returns
Section titled “Returns”GitHubProjects
Properties
Section titled “Properties”
readonlykey:"projects"
Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:178
Capability key, always "projects".
Implementation of
Section titled “Implementation of”Projects.key
providerName
Section titled “providerName”
readonlyproviderName:"github"="github"
Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:180
Provider name, always "github".
Implementation of
Section titled “Implementation of”Projects.providerName
Methods
Section titled “Methods”addItems()
Section titled “addItems()”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.
Parameters
Section titled “Parameters”_owner
Section titled “_owner”string
BoardSummary
BoardItemInput[]
template
Section titled “template”BoardTemplate
Returns
Section titled “Returns”Promise<AddedItem[]>
Implementation of
Section titled “Implementation of”Projects.addItems
close()
Section titled “close()”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.
Parameters
Section titled “Parameters”_owner
Section titled “_owner”string
BoardSummary
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Projects.close
create()
Section titled “create()”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.
Parameters
Section titled “Parameters”string
string
template
Section titled “template”BoardTemplate
Returns
Section titled “Returns”Promise<BoardSummary>
Implementation of
Section titled “Implementation of”Projects.create
ensure()
Section titled “ensure()”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.
Parameters
Section titled “Parameters”_owner
Section titled “_owner”string
BoardSummary
template
Section titled “template”BoardTemplate
Returns
Section titled “Returns”Promise<EnsureReport>
Implementation of
Section titled “Implementation of”Projects.ensure
find()
Section titled “find()”find(
owner,name):Promise<BoardSummary|undefined>
Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:208
The open board with exactly this name.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<BoardSummary | undefined>
Implementation of
Section titled “Implementation of”Projects.find
items()
Section titled “items()”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.
Parameters
Section titled “Parameters”_owner
Section titled “_owner”string
BoardSummary
template
Section titled “template”BoardTemplate
required?
Section titled “required?”SourceRequiredChecks
Returns
Section titled “Returns”Promise<BoardItem[]>
Implementation of
Section titled “Implementation of”Projects.items
list()
Section titled “list()”list(
owner):Promise<BoardSummary[]>
Defined in: plugins/holocron-plugin-github/src/capabilities/projects.ts:195
Every board of the organization, open and closed.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<BoardSummary[]>
Implementation of
Section titled “Implementation of”Projects.list
move()
Section titled “move()”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.
Parameters
Section titled “Parameters”_owner
Section titled “_owner”string
BoardSummary
BoardSummary
template
Section titled “template”BoardTemplate
Returns
Section titled “Returns”Promise<MoveReport>
Implementation of
Section titled “Implementation of”Projects.move
read()
Section titled “read()”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.
Parameters
Section titled “Parameters”_owner
Section titled “_owner”string
BoardSummary
Returns
Section titled “Returns”Promise<BoardState>
Implementation of
Section titled “Implementation of”Projects.read
setStatus()
Section titled “setStatus()”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.
Parameters
Section titled “Parameters”_owner
Section titled “_owner”string
BoardSummary
string
status
Section titled “status”string
Returns
Section titled “Returns”Promise<LifecycleResult>
Implementation of
Section titled “Implementation of”Projects.setStatus
whoami()
Section titled “whoami()”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.
Returns
Section titled “Returns”Promise<{ boards: number; ok: boolean; }>
Implementation of
Section titled “Implementation of”Projects.whoami