Integrations
GitHub
Automate GitHub issues, pull requests, and repository management
GitHub Integration
The GitHub integration allows you to automate your software development lifecycle. You can create issues, manage pull requests, and interact with repository files directly from your Nodes2Cloud workflows.
How to get credentials
To use the GitHub node, you need a Personal Access Token (PAT).
- Go to your GitHub account Settings.
- Scroll down to Developer settings → Personal access tokens → Tokens (classic).
- Click Generate new token (classic).
- Give your token a descriptive name (e.g., "Nodes2Cloud").
- Select the required scopes. At a minimum, you'll need the
reposcope to read and write to your repositories. - Click Generate token and copy the resulting string.
- In Nodes2Cloud, create a new GitHub credential and paste this token.
1. Issue Operations
What they do
Create, update, read, and manage issues and issue comments on a GitHub repository.
Available Actions
- Issue: Create: Creates a new issue.
- Issue: Get: Retrieves a single issue by its number.
- Issue: Update: Modifies an existing issue (e.g., changing the state to
closed). - Issue: Add Comment: Posts a new comment to an existing issue.
- Issue: List: Retrieves a list of issues for a repository.
Common Fields
- Credential: Your GitHub Personal Access Token.
- Owner: The username or organization name that owns the repository (e.g.,
octocat). - Repository: The name of the repository (e.g.,
Hello-World). - Issue Number: The ID number of the specific issue.
- Title / Body: (For Create/Update) The text contents of the issue.
2. Pull Request Operations
What they do
Retrieve, create, and merge pull requests.
Available Actions
- Pull Request: Create: Opens a new pull request from a head branch to a base branch.
- Pull Request: Get: Retrieves a specific pull request by its number.
- Pull Request: Merge: Merges a pull request.
Common Fields
- Owner / Repository: The target repository.
- Pull Request Number: The ID number of the PR.
- Head: The branch you want to merge from (e.g.,
feature-branch). - Base: The branch you want to merge into (e.g.,
main).
3. Repository & Branch Operations
What they do
Query general repository information, commit histories, and branch data.
Available Actions
- Repository: Get: Retrieves metadata about a repository.
- Repository: List Commits: Retrieves a list of recent commits on a repository.
- Branch: List: Lists the branches in a repository.
- File: Get Content: Retrieves the Base64 encoded content of a file.
- Release: Create: Drafts or publishes a new GitHub Release.
- Release: List: Lists releases for a repository.
Common Fields
- Owner / Repository: The target repository.
- File Path: (For File: Get Content) The path to the file in the repository (e.g.,
src/index.js). - Tag Name: (For Release: Create) The git tag associated with the release.
Common Troubleshooting
- 404 Not Found: This usually means your Personal Access Token does not have access to the repository, or the repository name is spelled incorrectly. Remember that the
OwnerandRepositoryare case-sensitive. If trying to access an organization's private repo, ensure your token has SSO authorized for that organization. - 403 Forbidden / API Rate Limit Exceeded: If you make too many requests in a short period, GitHub will temporarily block you. Wait an hour and try again.
- File Content is Base64: When using
File: Get Content, GitHub returns the file contents encoded in Base64. You will need to use a downstream code node (e.g.,Buffer.from(payload.content, 'base64').toString('utf-8')) to convert it back to readable text.
