The List Branches action retrieves details of all the branches available in a GitHub repository.

Overview

The List Branches action retrieves all branches in a GitHub repository using owner and repository names. The retrieved data includes the name, commit details, protection status, and HTML URL of each branch. The action requires an active GitHub session to authenticate the request.

Settings

The List Branches action contains the following settings:

Note: All the input fields support string variables. You can create a string variable to hold the appropriate text string and select it in the applicable setting.
Session name

Specifies the GitHub session name that the Connect action creates. Use one of the following options to specify the session name:

  • Session name: Enter the session name as text directly or select the string variable that holds the session name text. Automation 360 sets Default as the default session name.
  • Variable: Select the GitHub session variable that the Connect action creates.
Owner name
Specifies the name of the GitHub repository owner. The owner can be an organization or a user account. You can either enter the name directly as text or select the applicable string variable.
Repository name
Specifies the name of the GitHub repository from which the action retrieves the branches. You can either enter the repository name directly as text or select the applicable string variable.
Assign output to variable
Specifies the table variable in which the action stores the response data. The response data includes the following fields:
  • name : The name of the branch.
  • commitSHA : The unique identifier that GitHub generates for the latest commit in the branch.
  • commitURL : The API URL of the latest commit on the branch.
  • protected : The setting that indicates whether the branch is protected. This parameter returns true for the branches that have branch protection defined using rulesets.
  • htmlURL : The HTML URL of the branch.