Headlessly
Integrations

GitHub

Truth source for all Projects entities — bidirectional sync with repos, issues, and PRs.

GitHub is the truth source for all Projects entities from day 1.

Connect

import { Integration } from '@headlessly/platform'

await Integration.connect({ provider: 'github', token: process.env.GITHUB_TOKEN })

Entity Mapping

headless.lyGitHubDirection
ProjectRepos / ProjectsBidirectional
IssueIssues / PRsBidirectional
CommentIssue commentsBidirectional

Creating an Issue in headless.ly creates a GitHub issue. Closing a GitHub issue completes the Issue.

Webhook Events

GitHub Eventheadless.ly Event
issues.openedIssue.Created
issues.closedIssue.Completed
issues.assignedIssue.Assigned
pull_request.mergedIssue.Completed
issue_comment.createdComment.Created

Issue Status Mapping

GitHubheadless.ly
Open issueTodo or InProgress
Closed issueDone
Open PRInProgress
Merged PRDone

React to events with handlers:

import { Issue, Comment } from '@headlessly/projects'

Issue.completed((issue, $) => {
  $.Event.create({ type: 'issue_closed', project: issue.project })
})

Comment.created((comment, $) => {
  $.Event.create({ type: 'comment_added', issue: comment.issue })
})

On this page