The following workflow actions are available for the GitHub Connector integration.
Token type
Repository type
Permissions
Fine-grained personal access token
public
Select Repository permissions > Contents > Read and write.
Select Repository permissions > Pull requests > Read and write.
Select Repository permissions > Workflows > Read and write.
Fine-grained personal access token
private
Select Repository permissions > Contents > Read and write.
Select Repository permissions > Pull requests > Read and write.
Select Repository permissions > Workflows > Read and write.
Token (classic)
public
Select scopes > repo > public_repo.
Token (classic)
private
Select scopes > repo (Full control of private repositories).
The Get content action returns the content of an existing file in the repository.
Field | Description | Required |
---|---|---|
Connection | Connection to your GitHub environment. | required |
Owner | Account owner of the repository (private user or organization). | required |
Repository | The name of the repository without the .git extension. The name is not case-sensitive. | required |
File path | The file path to a single, existing file. A directory path is not supported. | required |
Reference | The name of the commit, branch or tag. If not set, the repository's default branch is used. | optional |
The action returns the content
property that contains the plain text content of an existing file in the repository.
Token type
Repository type
Permissions
Fine-grained personal access token
public
No additional permissions are required.
Fine-grained personal access token
private
Select Repository permissions > Contents > Read only.
Token (classic)
public
No additional permissions are required.
Token (classic)
private
Select scopes > repo (Full control of private repositories).
The Create or replace file action creates a new file with the specified content or replaces an existing one. Next, it commits the change to a newly created branch using the specified source branch or the specified existing branch.
Field | Description | Required |
---|---|---|
Connection | Connection to your GitHub environment. | required |
Owner | Account owner of the repository (private user or organization). | required |
Repository | The name of the repository without the .git extension. The name is not case-sensitive. | required |
Create new branch | Select this option if you want the change to be made in a new branch. | optional |
Commit to an existing branch | Select this option if you're going to use an existing branch for the change. | optional |
Source branch | The source branch on which the new branch is based (for example, "main"). | optional |
Branch | The new or existing branch you want to commit to. | required |
File path | The relative path to the file. A directory path is not supported. Existing files will be overwritten. | required |
File content | The full content of the file. Existing files will be overwritten. | required |
Commit message | The git commit message for the change. | required |
The action returns the fileMetadata
property that contains the full response of the corresponding GitHub API endpoint.
Token type
Repository type
Permissions
Fine-grained personal access token
public
Select Repository permissions > Contents > Read and write.
Fine-grained personal access token
private
Select Repository permissions > Contents > Read and write.
Select Repository permissions > Workflows > Read and write. (required to modify GitHub workflow files)
Token (classic)
public
Select scopes > repo > public_repo.
Token (classic)
private
Select scopes > repo (Full control of private repositories).
The Delete file action deletes an existing file in the repository and commits the change to either a newly created branch using the specified source branch as a basis or uses the specified existing branch.
Field | Description | Required |
---|---|---|
Connection | Connection to your GitHub environment. | required |
Owner | Account owner of the repository (private user or organization). | required |
Repository | The name of the repository without the .git extension. The name is not case-sensitive. | required |
Create new branch | Select this option if you want the file deletion to be made in a new branch. | optional |
Commit to an existing branch | Select this option if you're going to use an existing branch for the change. | optional |
Source branch | The source branch on which the new branch is based, for instance, "main". | optional |
Branch | The new or existing branch you want to commit to. | required |
File path | The relative path to the file to be deleted. A directory path is not supported. | required |
Commit message | The git commit message for the change. | required |
The action returns the fileMetadata
property that contains the full response of the corresponding GitHub API endpoint.
Token type
Repository type
Permissions
Fine-grained personal access token
public
Select Repository permissions > Contents > Read and write.
Fine-grained personal access token
private
Select Repository permissions > Contents > Read and write.
Token (classic)
public
Select scopes > repo > public_repo.
Token (classic)
private
Select scopes > repo (Full control of private repositories).
The Create pull request action creates a pull request for an existing branch and the specified target branch (for example, main
).
Field | Description | Required |
---|---|---|
Connection | Connection to your GitHub environment. | required |
Owner | Account owner of the repository (private user or organization). | required |
Repository | The name of the repository without the .git extension. The name is not case-sensitive. | required |
Source branch | The source branch where the changes are implemented. | required |
Target branch | The target branch you want the changes to be pulled into. | required |
Pull request title | The title of the pull request. | required |
Pull request description | The description of the pull request. | optional |
The action returns the pullRequest
property that contains the full response of the corresponding GitHub API endpoint.
Token type
Repository type
Permissions
Fine-grained personal access token
public
Select Repository permissions > Pull requests > Read and write.
Fine-grained personal access token
private
Select Repository permissions > Pull requests > Read and write.
Token (classic)
public
Select scopes > repo > public_repo.
Token (classic)
private
Select scopes > repo (Full control of private repositories).
The Get pull request action returns details about the specified pull request.
Field | Description | Required |
---|---|---|
Connection | Connection to your GitHub environment. | required |
Owner | Account owner of the repository (private user or organization). | required |
Repository | The name of the repository without the .git extension. The name is not case-sensitive. | required |
Pull request number | The number that identifies the pull request. | required |
The action returns the pullRequest
property that contains the full response of the corresponding GitHub API endpoint.
Token type
Repository type
Permissions
Fine-grained personal access token
public
No additional permissions are required.
Fine-grained personal access token
private
Select Repository permissions > Pull requests > Read-only.
Token (classic)
public
No additional permissions are required.
Token (classic)
private
Select scopes > repo (Full control) of private repositories.
The List pull requests action returns a list of pull requests that match the specified criteria. The limit of 30 pull requests applies.
Field | Description | Required |
---|---|---|
Connection | Connection to your GitHub environment. | required |
Owner | Account owner of the repository (private user or organization). | required |
Repository | The name of the repository without the .git extension. The name is not case-sensitive. | required |
State | The state of pull requests you're interested in (open, closed, all). | optional |
The action returns the pullRequest
property that contains the full response of the corresponding GitHub API endpoint.
Token type
Repository type
Permissions
Fine-grained personal access token
public
No additional permissions are required.
Fine-grained personal access token
private
Select Repository permissions > Pull requests > Read-only.
Token (classic)
public
No additional permissions are required.
Token (classic)
private
Select scopes > repo (Full control of private repositories).
The Merge pull request action merges the specified pull request.
Field | Description | Required |
---|---|---|
Connection | Connection to your GitHub environment. | required |
Owner | Account owner of the repository (private user or organization). | required |
Repository | The name of the repository without the .git extension. The name is not case-sensitive. | required |
Pull request number | The number that identifies the pull request. | required |
Merge Method | The merge method to use. | optional |
The action returns the mergeStatus
property that contains the full response of the corresponding GitHub API endpoint.
Token type
Repository type
Permissions
Fine-grained personal access token
public
Select Repository permissions > Contents > Read and write.
Fine-grained personal access token
private
Select Repository permissions > Contents > Read and write.
Token (classic)
public
Select scopes > repo > public_repo.
Token (classic)
private
Select scopes > repo (Full control of private repositories).