Skip to main content
Version: 8.6

GitHub Connector

The GitHub Connector is an outbound Connector that allows you to connect your BPMN service with GitHub to manage GitHub issues and releases.

Prerequisites

To use the GitHub Connector, you must have a GitHub instance and an access token of a user or a service account on whose behalf a BPMN process will be executed.

note

Use Camunda secrets to avoid exposing your GitHub access token credentials as plain text. Refer to our documentation on managing secrets to learn more.

Create a GitHub Connector task

You can apply a Connector to a task or event via the append menu. For example:

  • From the canvas: Select an element and click the Change element icon to change an existing element, or use the append feature to add a new element to the diagram.
  • From the properties panel: Navigate to the Template section and click Select.
  • From the side palette: Click the Create element icon.

change element

After you have applied a Connector to your element, follow the configuration steps or see using Connectors to learn more.

Authentication

In the Authentication section, provide a GitHub access token.

Select operation to execute

The GitHub Connector currently supports the following operations.

Issues

Create an issue

  • GitHub API: Create an issue.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Title: The title of the issue.
  • Body: The contents of the issue.
  • Assignees: Logins for users to assign to this issue. Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
  • Labels: Labels to associate with this issue. Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
  • Milestone: The number of the milestone to associate this issue with or use null to remove the current milestone. Only users with push access can set the milestone for issues. Without push access to the repository, milestone changes are silently dropped.

Get an issue

  • GitHub API: Get an issue.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Issue number: The number that identifies the issue.

Update an issue

  • GitHub API: Update an issue.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Issue number: The number that identifies the issue.
  • Title: The title of the issue.
  • Body: The contents of the issue.
  • Assignees: Logins for users to assign to this issue. Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
  • Labels: Labels to associate with this issue. Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
  • Milestone: The number of the milestone to associate this issue with or use null to remove the current milestone. Only users with push access can set the milestone for issues. Without push access to the repository, milestone changes are silently dropped.
  • Issue state: The open or closed state of the issue. Can be open or closed.
  • State reason: The reason for the state change. Ignored unless state is changed. Can be one of: completed, not_planned, reopened, null.

Create an issue comment

  • GitHub API: Create an issue comment.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Issue number: The number that identifies the issue.
  • Body: The contents of the comment.

Search issue

  • GitHub API: Search issue.
  • Query: The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, refer to constructing a search query. Refer to searching issues and pull requests for a detailed list of qualifiers.

List commits

  • GitHub API: List commits.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.

Branches

List branches

  • GitHub API: List branches.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.

Get a branch

  • GitHub API: Get a branch.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Branch: The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use the GraphQL API.

Merge a branch

  • GitHub API: Merge a branch.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Base: The name of the base branch that the head will be merged into.
  • Head: The head to merge. This can be a branch name or a commit SHA1.

Code scanning

List code scanning alerts for an organization

List code scanning alerts for a repository

Organization

Create an organization invitation

Release

Create a release

  • GitHub API: Create a release.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Body: Text describing the contents of the tag.
  • Tag name: The name of the tag.
  • Release name: The name of the release.
  • Make latest: Specifies whether this release should be set as the latest release for the repository. Drafts and pre-releases cannot be set as latest. Defaults to true for newly published releases. Legacy specifies that the latest release should be determined based on the release creation date and higher semantic version. Default: true. Can be one of: true, false, legacy.

Update a release

  • GitHub API: Update a release.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repository: The name of the repository. The name is not case-sensitive.
  • Release ID: The unique identifier of the release.
  • Body: Text describing the contents of the tag.
  • Tag name: The name of the tag.
  • Release name: The name of the release
  • Make latest: Specifies whether this release should be set as the latest release for the repository. Drafts and pre-releases cannot be set as latest. Defaults to true for newly published releases. Legacy specifies that the latest release should be determined based on the release creation date and higher semantic version. Default: true. Can be one of: true, false, legacy.

Delete a release

  • GitHub API: Delete a release.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repository: The name of the repository. The name is not case-sensitive.
  • Release ID: The unique identifier of the release.

List releases

  • GitHub API: List releases.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.

Repository

List organization repositories

Create an organization repository

  • GitHub API: Create an organization repository.
  • Organization name: The organization name. The name is not case-sensitive.
  • Repository name: The organization name. The name is not case-sensitive.
  • Description: A short description of the repository.
  • Home page: A URL with more information about the repository.
  • Visibility: The visibility of the repository. Can be one of: public, private.

Get a repository

  • GitHub API: Get a repository.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.

Update a repository

  • GitHub API: Update a repository.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Repository name: The organization name. The name is not case-sensitive.
  • Description: A short description of the repository.
  • Home page: A URL with more information about the repository.
  • Visibility: The visibility of the repository. Can be one of: public, private.

Delete a repository

  • GitHub API: Delete a repository.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.

List repository contributors

  • GitHub API: List repository contributors.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.

Get repository content

  • GitHub API: Get repository content.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive.
  • Path: The path of the content within the repository.
  • Ref: The name of the commit/branch/tag. Defaults to the repository’s default branch.

Actions

Create workflow dispatch event

  • GitHub API: Create workflow dispatch event
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive
  • Workflow ID: The ID of the workflow. You can also pass the workflow file name as a string.
  • Git reference: The branch or tag name for the workflow.
  • Workflow inputs: An object containing up to 10 key-value pairs. Inputs are configured in the workflow file.

References

Create a reference

  • GitHub API: Create a reference
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive
  • Git reference: The name of the fully qualified reference (i.e: refs/heads/master).
  • SHA1: The SHA1 value to create this reference from.

Pulls

Create a pull request

  • GitHub API: Create a pull request.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive
  • Title: The title of the new pull request.
  • Head: The name of the branch where your changes are implemented.
  • Base: The name of the branch you want the changes pulled into.
  • Body: The contents of the pull request.
  • Draft: Indicates whether the pull request is a draft.

Collaborators

List repository collaborators

  • GitHub API: List repository collaborators.
  • Owner: The account owner of the repository. The name is not case-sensitive.
  • Repo: The name of the repository. The name is not case-sensitive
  • Page: The page number of the results to fetch.
  • Results per page: The number of results per page.

Handle Connector response

The GitHub Connector is a protocol Connector, meaning it is built on top of the HTTP REST Connector, therefore handling response is still applicable as described.