GitHub API Integration

Adding a GitHub API integration allows you to use the GitHub CLI in your pipelines.

The integration uses the GitHub personal access token. Buddy lets you add multiple integrations using different personal access tokens, which allows you to run GitHub CLI commands as different users.

Setting up the integration

  1. Go to your pipeline and add the GitHub CLI action from the DevOps category.
  2. Open the dropdown menu and click Add new integration.

Image loading...Adding an integration

  1. Click Set up a new GitHub API integration.
  2. Click the Get token button to open a new tab and create a personal access token in GitHub.

Image loading..."Get token" button

  1. In GitHub, create a personal access token with the scopes you need to run the operations you want to add to your workflow.
Success
Buddy doesn't require any specific scopes to make the integration work, so choose exactly what you need.
  1. After creating the token, copy it and return to Buddy to finish the configuration. Enter your GitHub username and paste the token into the corresponding fields. Click Add a new integration to continue.

Working with multiple integrations

You can add multiple integrations to run GitHub CLI as different users. To add a new integration, use the dropdown menu in the top left part of the action's terminal view:

Image loading...Adding more integrations

When you add multiple integrations, you can switch between them using the same dropdown menu:

Image loading...Switching between integrations

Hint
Choosing the integration works on a per-action basis. This means that you can run different GitHub CLI actions as different users within the same pipeline.

Last modified on Sep 23, 2024