Linea Docs

GitHub Node

Create issues, comment on issues, list issues, or open pull requests via the GitHub REST API.

GitHub Node

The github node interacts with GitHub repositories via the REST API using a Personal Access Token.

Credential Setup

Store your Personal Access Token in workspace secrets under the name GITHUB_TOKEN.

Required scopes: repo (full repository access) or at minimum issues:write for issue operations and pull_requests:write for PRs.

Configuration Fields

FieldTypeDescription
actioncreate_issue | comment_issue | list_issues | create_prOperation to perform
ownerstringRepository owner (user or org name, supports {{}})
repostringRepository name (supports {{}})
titlestringIssue or PR title (required for create_issue, create_pr)
bodystringIssue body, comment text, or PR description (supports {{}})
labelsstringComma-separated label names for create_issue
issueNumbernumberIssue number (required for comment_issue)
headstringHead branch for create_pr
basestringBase branch for create_pr

owner and repo are required for all actions.

Actions

create_issue

Creates a new issue. title is required.

Output: { "number": 42, "url": "https://github.com/owner/repo/issues/42" }

comment_issue

Adds a comment to an existing issue. issueNumber and body are required.

Output: { "id": 123456, "url": "https://github.com/owner/repo/issues/42#issuecomment-123456" }

list_issues

Returns up to 50 open issues.

Output: { "issues": [{ "number": 42, "title": "Bug report", "state": "open", "url": "..." }] }

create_pr

Opens a pull request. title, head, and base are required.

Output: { "number": 7, "url": "https://github.com/owner/repo/pull/7" }

The GitHub API version used is 2022-11-28. Tokens are sent as Authorization: Bearer headers.

Example Config

{
  "action": "create_issue",
  "owner": "{{input.orgName}}",
  "repo": "{{input.repoName}}",
  "title": "Automated report: {{lastOutput.title}}",
  "body": "{{lastOutput.body}}",
  "labels": "automated,report"
}

On this page