GitHub is a software development service for hosting and version control.
Create a GitHub Integration Using OAuth 2.0
Creating an integration using OAuth 2.0 requires a GitHub account associated with an Organization with, at least, the GitHubâs App Manager Role.
It also requires that the account creating the integration in Torq have at least the Contributor role.
Create a New App in GitHub
Go to GitHub settings and click New GitHub App.
Give the application a unique and meaningful name.
Under Homepage URL enter app.torq.io.
Under Callback URL enter https://redir.torq.io/integrations/oauth_2
Check the box Expire user authorization tokens.
Check the box Request user authorization (OAuth) during installation)
Configure permissions to the specific level of permissions you desire for your workflows.
Under Where can this GitHub App be installed? select Only on this account.
Click Create GitHub App.
Copy the Client ID and save it in a safe location.
Click Generate a new client secret, copy it and save it in a safe location.
In the following menu, click Advanced > Transfer Ownership. Enter the name of your organization. Be careful to spell it accurately, as this cannot be undone.
Click on Transfer this GitHub App.
Go back to the menu and click Install App, and then click Install next to your organization name to have the App installed in your desired Organization.
Select either All repositories or Only select repositories that you would like to allow the Torq app access to.
Click Install & Authorize.
Create a GitHub OAuth 2.0 Integration in Torq
In Build > Integrations > Steps > OAuth 2.0 click Add.
Give the app a meaningful name, such as GitHub App OAuth.
Under Grant Type, select Authorization Code.
Under Auth URL enter https://github.com/login/oauth/authorize.
Under Token URL enter https://github.com/login/oauth/access_token.
For Client ID & Client Secret paste the ID and Secret you copied and saved earlier.
Scopes should be a comma separated list of GitHub Scopes, for example: repo,security-events,admin:org,gist,notifications,codespace,workflow,user,project
Click Continue.
Create a GitHub Integration Using an API Key
Get a GitHub API Key
Go to Settings > Developer settings.
Under Personal access tokens, go to Tokens.
Click Generate new token.
Give the token a unique and meaningful name.
Select the access permissions you want this token to have.
Copy the access token and save it in a secure location; you will not be able to see it again.
Create a GitHub Step Integration in Torq
In Torq, go to Build > Integrations > Steps > GitHub
Click Add.
Give the integration a unique and meaningful name.
Paste the API key you generated earlier.
Click Add.
Premade Steps
These are the premade steps for GitHub. Don't see the step you need? No problem; you can easily create a custom step.
Add assignee to issue
Add repository collaborator
Check if a user can be assigned
Check if a user is a repository collaborator
Create blob
Create branch
Create comment
Create file
Create a pull request
Create a pull request from a base branch
Create a comment
Create an issue
Get artifact
Get blob
Get a single file
Get an issue
Get repositories
Get releases
Get tags
Merge
Lock issue
List organization members
List organization repositories
List releases
List tags
Remove repository collaborator
Search branches
Update issue
Unlock issue
Update issue