Class: GithubIssuesTrackerAdapter<TExternalState>
Defined in: github/src/executors/github-issues-tracker.ts:23
Runtime TrackerAdapter implementation for GithubIssuesTrackerNode (github:issues).
Polls open issues from /repos/:owner/:repo/issues across per_page: 100 pages via @octokit/rest (filtering out pull requests) and adds lifecycle state labels non-destructively via issues.addLabels.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TExternalState extends string | string | External tracker state string union. |
Implements
TrackerAdapter<GithubIssueRecord,TExternalState>
Constructors
Constructor
new GithubIssuesTrackerAdapter<TExternalState>(
node,
ctx,
transport?
): GithubIssuesTrackerAdapter<TExternalState>;Defined in: github/src/executors/github-issues-tracker.ts:44
Initializes a new GithubIssuesTrackerAdapter bound to node, ctx, and transport.
Resolves node.token lazily on each poll() and setExternalState() call via ctx.resolveEnv.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
node | GithubIssuesTrackerNode<GithubIssueRecord, TExternalState> | undefined | Passive GitHub Issues tracker AST node. |
ctx | RuntimeDriverContext | undefined | Runtime driver context. |
transport? | GithubHttpTransport | defaultGithubHttpTransport | Pluggable GitHub HTTP transport. |
Returns
GithubIssuesTrackerAdapter<TExternalState>
Methods
poll()
poll(): Promise<readonly GithubIssueRecord[]>;Defined in: github/src/executors/github-issues-tracker.ts:63
Polls open issues from /repos/${repo}/issues across 100-item pages and filters out pull requests.
Uses @octokit/rest issues.listForRepo with per_page: 100 and excludes entries with pull_request.
Returns
Promise<readonly GithubIssueRecord[]>
Frozen array of normalized GitHub issue records.
Throws
If token resolution fails, the repo slug is invalid, or the API payload is malformed.
Implementation of
setExternalState()
setExternalState(itemKey, state): Promise<void>;Defined in: github/src/executors/github-issues-tracker.ts:91
Adds the target external state label non-destructively via @octokit/rest issues.addLabels.
Strips any leading '#' prefix from itemKey and preserves existing non-state issue labels.
Parameters
| Parameter | Type | Description |
|---|---|---|
itemKey | string | Issue key such as '#42' or '42'. |
state | TExternalState | Target external state label to apply. |
Returns
Promise<void>
Resolves once the GitHub issue label has been added.
Throws
If token resolution fails, itemKey is not a positive integer, or repo slug is invalid.