Skip to main content

GitHub/Bitbucket Cloud

The GitHub/Bitbucket cloud integration manages Git repositories while enabling you to clone Git repositories and create pull requests.

Configure GitHub/Bitbucket in Spot Connect

  1. In the left main menu, click Connect and click Settings.
  2. Under the Integrations tab, select GitHub/Bitbucket Cloud.
  3. Configure a new integration instance with the information below.

Details needed to set up a GitHub/Bitbucket Cloud instance in Spot Connect:

ParameterDescriptionRequired
Resource AliasA name for the integration instanceTrue
SSH KeyPrivate KeyRequired when Access Token is not provided
URLRepository URLTrue
Access TokenAccess Token from GitHub/Bitbucket cloudRequired when SSH Key is not provided
GitHub or Bitbucket Cloud Repo NameName of the Git repository from GitHub/Bitbucket cloudTrue
GitHub or Bitbucket Cloud User NameUsername of GitHub/Bitbucket cloudTrue

Integration Actions

You can add these actions in the Spot Connect workflow builder as part of your workflow:

GitHub/Bitbucket Cloud Clone

Action to clone a GitHub/Bitbucket Cloud repository and copy repository content to AWS S3 bucket.

Input

ParameterDescriptionRequired
GitHub/Bitbucket Cloud RepositorySelect a repository added to GitHub/Bitbucket cloud in Spot Connect settingsTrue
AWS S3 BucketSelect AWS S3 bucket added to Spot Connect resourcesTrue

Output

ParameterTypeDescription
s3_bucketStringS3 bucket uploaded with Git repository content
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

Select GitHub/Bitbucket Cloud Repository and AWS S3 Bucket inputs to configure the action.

github-bitbucket-1

GitHub/Bitbucket Cloud Create PR

This action creates a pull request for a given GitHub/Bitbucket Cloud repository.

Input

ParameterDescriptionRequired
AWS S3 Bucket with Base Branch ContentAWS S3 bucket for storing the repository content of the base branch on which changes are to be appliedTrue
AWS S3 Bucket with Head Branch ContentAWS S3 bucket for storing the repository content (changed files) of the head branchTrue
GitHub/Bitbucket Cloud RepositoryGitHub/Bitbucket Cloud base repository to which pull request is to be createdTrue
GitHub/Bitbucket Cloud Pull Request TitleTitle of the pull requestTrue
GitHub/Bitbucket Cloud Current BranchGitHub/Bitbucket Cloud active branch name with changes, that are to be updated in the base branchTrue
GitHub/Bitbucket Cloud Base BranchGitHub/Bitbucket Cloud branch that needs to be updated using pull requestTrue
ReviewersAn array of user logins that will be requested for a review (user email for GitHub or user ID for Bitbucket Cloud)False
DescriptionPull Request descriptionFalse

Output

ParameterTypeDescription
execution_statusStringStatus of run (ie: S_OK / E_FAIL)
pull_request_urlStringURL of pull request created in GitHub/Bitbucket cloud

Action Example

github-bitbucket-2

GitHub Filter Runners

This action lists GitHub runners based on the status, busy, and labels filters.

Input

ParameterDescriptionRequired
GitHub RepositorySelect a spot integration instanceTrue
Busy To Filter BySelect a Spot accountTrue
Status To Filter BySelect a Spot Account GroupTrue
Specify LabelsAdd Instance ID to be detachedTrue

Output

ParameterTypeDescription
identified_runnersStringListList of identified GitHub runners matching the filter
count_of_runnersIntegerNumber of GitHub runners matching the filter
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

  1. Select the GitHub repository and the GitHub runner busy state to filter by.

    github-bitbucket-3
  2. Select state of GitHub runner to filter.

    github-bitbucket-4
  3. Provide labels to match GitHub runners.

    github-bitbucket-5 github-bitbucket-6