Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fadyat/hooks

Track commit history inside your task 🕵️‍♀️
https://github.com/fadyat/hooks

asana commit-hooks gitlab

Last synced: about 1 month ago
JSON representation

Track commit history inside your task 🕵️‍♀️

Awesome Lists containing this project

README

        

## Hooks

This project is dedicated to boosting your development workflow by seamlessly integrating GitLab with Asana.

Say goodbye to manual task tracking and commit updates – this tool automates it all!

### Distinguishing Features

- Focused Task Management
> Our integration is all about making Asana task management incredibly smooth.
>
> It's designed to effortlessly connect Git commits with Asana tasks.

- Track History
> Keep tabs on all commits and merges, providing a clear history of task-related changes.

- Connect Multiple Tasks
> Link multiple tasks to a single commit or merge request, ensuring comprehensive tracking.

- Customization
> Tailor commit messages and merge request descriptions to suit your needs.

Ready to supercharge your workflow? Explore our integration today!

### Workflow

Pass a task to a `commit message` with the following syntax or `name a branch` with the following syntax:

As a separator can be used one of the following characters: `|`, `:`, `-`, `_`, `=`.

```text
Pattern:
- asana|
- ref|

Not abstract examples:
- asana|123456789
- asana_123456789
- ref=123456789
```

Works for multiple passed tasks.

### Some interesting cases:

- If task passed in branch and in commit message, all tasks will be updated.
- When merging a branch with following pattern, message will be created in the task.

### Gitlab integration

#### How to use:

```text
- Set up a service (configuration section)
- Launch service (could use ngrok for local testing)
- Set up a webhook in Gitlab
* URL:
* Secret Token:
* Trigger: Push events / Merge request events
```

#### Endpoints:

| Endpoint | Trigger | Description |
|-----------------------------------|------------------------|-----------------------------------------------------------------|
| `/api/v1/asana/push` | `push events` | Notify asana about the last commit in the branch |
| `/api/v1/gitlab/sync_description` | `merge request events` | Binding a short link of the asana task to the description of MR |
| `/api/v1/asana/merge` | `merge request events` | Notify asana about the merge of the branch |

### Configuration

- Put in `.env` file in the root of the project, or set up environment variables.

```dotenv
# asana access token for editing tasks custom fields
ASANA_API_KEY=

# secret tokens that will be used to verify the webhook
GITLAB_SECRET_TOKENS=

# gitlab api key for updating the merge request description
# make sure, that generated token has access to the project!
#
# minimal required permissions:
# - role: developer
# - scopes: api
#
GITLAB_API_KEY=

# if you using a self-hosted gitlab, you can specify the url
# default: https://gitlab.com/api/v4
GITLAB_DOMAIN=
```

### Feature flags:

```dotenv
# getting task mentions from commit message
IS_COMMIT_MENTIONS_ENABLED= # default: false

# make some blured logs when server is started
IS_REPRESENT_SECRETS_ENABLED= # default: false
```

### Documentation

- `/swagger/index.html` for swagger docs