A GitHub action to make using wrike as a task management tool easier. It does some of the convenient things GitHub does for Issues:
- link pull request to wrike task when the pull request links to the task
- merging a pull request marks the linked task as completed automatically
This Action recognizes that a pull request links to a wrike task, if there is a wrike permalink pointing to a task in the pull request description. It will then post a comment to the task with a link to the pull request, and mark the task as completed when the pull request is merged.
## Task
https://www.wrike.com/open.htm?id=696166643
## What
Abstracted common functionality into a new interface
## How
* implemented new interface
* changed all callsites to use interface
* added generated tests
Here's a sample workflow:
name: 'Update wrike'
on:
pull_request:
types:
- closed # for closing tasks on merge
- edited # link in description might be updated
- opened # yay new pr
- reopened # someone must've whoops'ed a pr
- ready_for_review # a pr is no longer draft
# - synchronize # new commit to pr
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: valerauko/wrike-ist@v1
env:
WRIKE_TOKEN: ${{ secrets.WRIKE_TOKEN }}
Currently this action needs a permanent token as it does not support the wrike OAuth workflow. You can issue one from the Apps & Integrations menu.
Once you have a token, add it to your repository at Settings > Secrets.
Optionally you can specify (by name) what status you'd want to move the linked task to.
Specifies the status to move the task to when the linked PR is merged.
If not specified or not found, falls back to the first Completed status in your workflow.
The transition can be disabled by setting the merged
value to "-"
.
Specifies the status to move the task to when the linked PR is ready for review (opened or re-opened as ready-for-review, or marked as ready-for-review from draft).
If not specified, does nothing.
Specifies the status to move the task to when the linked PR is closed without merging.
If not specified or not found, falls back to the first Cancelled status in your workflow.
The transition can be disabled by setting the closed
value to "-"
.
alias yarn="docker-compose run --rm dev yarn"
The development environment is dockerized so you don't need npm or Java installed locally.
- clone the source code
- install JS dependencies with
yarn
- apply your changes
- lint it with
yarn lint
Push to see how Github likes it (set up Github actions in your repo to have it run on a feature/branch).
yarn clean
yarn hard-reset
Cover photo by Ochir-Erdene Oyunmedeg on Unsplash.