List branches action in GitHub package
- Updated: 2026/05/13
List branches action in GitHub package
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.
Note: Ensure that the Connect action
is configured before proceeding with the List issues as the
Connect action provides the authentication context for the
automation session.
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.
- 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.
- Repository name
- Specifies the name of the GitHub repository from which the action retrieves the branches.
- 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 HTML URL of the latest commit on the branch.protected: The setting that indicates whether the branch is protected. This parameter returnstruefor the branches that have branch protection defined using rulesets.htmlURL: The HTML URL of the branch.