Skip to content

JimmySorza/gitlab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub for Aha! Develop

This is an extension for Aha! Develop providing integration with GitHub.

It provides these contributions:

  • Links attribute - Link Aha! Develop records to GitHub branches and pull requests. See the status checks and approvals for the PR.
  • My Pull Requests - A full page view of recent Pull Requests and branches.
  • Webhook - Automatically links pull requests to records if the PR title starts with the record reference number.

The GitHub extension triggers events that other extensions can use for automation. For example, an extension can listen for the label event:

aha.on({ event: 'aha-develop.github.pr.labeled' }, async ({ record, payload }) => {
  if (payload.label.name = 'documentation') {
    const task = new aha.models.Task();
    task.record = record;
    task.name = 'Write documentation';
    task.body = `Todo created from GitHub PR ${payload["pull_request"]["html_url"]}`;
    await task.save();
  }
});

Installing the extension

Note: In order to install an extension into your Aha! Develop account, you must be an account administrator.

  1. Install the GitHub extension by clicking here.

  2. Configure a webhook in GitHub. The extension will automatically link Aha! records to branches and pull requests in GitHub if you include the Aha! reference number (like APP-123) in the name of the branch or pull request. To enable this:

    • In Aha! go to Settings -> Account -> Extensions -> GitHub Integration -> Webhook from Github. Copy the hidden URL.

    • In GitHub go to each repo that you want to integrate with Aha!. In Settings -> Webhook create a new webhook. The payload URL is the URL you copied from the extension. The content type should be application/json. Select the following individual events: Branch or tag creation, Check runs, Pull requests, Pull request reviews, Pushes, Statuses. Enable the webhook.

    • Instead of doing this at the repo level, it is also possible to create an organization-wide webhook that wil work for all repos.

  3. Configure the extension with your repos. In Aha! go to Settings -> Account -> Extensions -> GitHub Integration. In the Related repositories section add each repo that should be considered when looking for PRs that match a feature ID.

Working on the extension

Install aha-cli:

npm install -g aha-cli

Clone the repo:

git clone https://github.com/aha-develop/github.git

Install required modules:

yarn install

Note: In order to install an extension into your Aha! Develop account, you must be an account administrator.

Install the extension into Aha! and set up a watcher:

aha extension:install
aha extension:watch

Now, any change you make inside your working copy will automatically take effect in your Aha! account.

Building

When you have finished working on your extension, package it into a .gz file so that others can install it:

aha extension:build

After building, you can upload the .gz file to a publicly accessible URL, such as a GitHub release, so that others can install it using that URL.

To learn more about developing Aha! Develop extensions, including the API reference, the full documentation is located here: Aha! Develop Extension API

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%