Skip to main content
GitHub

Learn how to get a GitHub API key and integrate it with Torq for various repository and issue management steps.

Updated over 5 months ago

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

  1. Go to GitHub settings and click New GitHub App.

  2. Give the application a unique and meaningful name.

  3. Under Homepage URL enter app.torq.io.

  4. Check the box Expire user authorization tokens.

  5. Check the box Request user authorization (OAuth) during installation)

  6. Configure permissions to the specific level of permissions you desire for your workflows.

  7. Under Where can this GitHub App be installed? select Only on this account.

  8. Click Create GitHub App.

  9. Copy the Client ID and save it in a safe location.

  10. Click Generate a new client secret, copy it and save it in a safe location.

    4.png
  11. 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.

    5.png
  12. Click on Transfer this GitHub App.

  13. 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.

    7.png
  14. Select either All repositories or Only select repositories that you would like to allow the Torq app access to.

  15. Click Install & Authorize.

Create a GitHub OAuth 2.0 Integration in Torq

  1. In Build > Integrations > Steps > OAuth 2.0 click Add.

  2. Give the app a meaningful name, such as GitHub App OAuth.

  3. Under Grant Type, select Authorization Code.

  4. For Client ID & Client Secret paste the ID and Secret you copied and saved earlier.

  5. Scopes should be a comma separated list of GitHub Scopes, for example: repo,security-events,admin:org,gist,notifications,codespace,workflow,user,project

  6. Click Continue.

    9.png

Create a GitHub Integration Using an API Key

Get a GitHub API Key

  1. Go to Settings > Developer settings.

    githubdeveloper
  2. Under Personal access tokens, go to Tokens.

  3. Click Generate new token.

  4. Give the token a unique and meaningful name.

  5. Select the access permissions you want this token to have.

    githubmakesecret
  6. Copy the access token and save it in a secure location; you will not be able to see it again.

    githubsecret

Create a GitHub Step Integration in Torq

  1. In Torq, go to Build > Integrations > Steps > GitHub

  2. Click Add.

  3. Give the integration a unique and meaningful name.

  4. Paste the API key you generated earlier.

  5. 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

Did this answer your question?