https://github.com/ssube/cautious-journey
label manager and state machine for Github and Gitlab
https://github.com/ssube/cautious-journey
github-labels github-workflow gitlab-label gitlab-workflow labels state-machine workflow
Last synced: 3 months ago
JSON representation
label manager and state machine for Github and Gitlab
- Host: GitHub
- URL: https://github.com/ssube/cautious-journey
- Owner: ssube
- License: mit
- Created: 2020-08-11T23:03:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-27T18:02:27.000Z (about 1 year ago)
- Last Synced: 2024-04-27T19:22:09.472Z (about 1 year ago)
- Topics: github-labels, github-workflow, gitlab-label, gitlab-workflow, labels, state-machine, workflow
- Language: TypeScript
- Homepage:
- Size: 1.46 MB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Cautious Journey
![]()
Label manager and state machine, for Github and Gitlab.## Features
- create, delete, and update project labels
- add and remove issue labels
- mutually-exclusive label groups
- state machine between group values
- `dot` graph output
- supports Github and Gitlab## Contents
- [Cautious Journey](#cautious-journey)
- [Features](#features)
- [Contents](#contents)
- [Status](#status)
- [Releases](#releases)
- [Usage](#usage)
- [Running with Docker](#running-with-docker)
- [Running with Yarn](#running-with-yarn)
- [Logging with Bunyan](#logging-with-bunyan)
- [Graphing with GraphViz](#graphing-with-graphviz)
- [Build](#build)
- [License](#license)## Status
[](https://git.apextoaster.com/ssube/cautious-journey/commits/master)
[](https://sonarcloud.io/dashboard?id=ssube_cautious-journey)
[](https://codecov.io/gh/ssube/cautious-journey)
[](https://github.com/ssube/cautious-journey/blob/master/LICENSE.md)[](https://github.com/ssube/cautious-journey/issues?q=is%3Aopen+is%3Aissue+label%3Atype%2Fbug)
[](https://github.com/ssube/cautious-journey/issues?q=is%3Aopen+is%3Aissue)
[](https://github.com/ssube/cautious-journey/issues?q=is%3Aissue+is%3Aclosed)[](https://renovatebot.com)
[](https://libraries.io/github/ssube/cautious-journey)
[](https://snyk.io/test/github/ssube/cautious-journey)[](https://codeclimate.com/github/ssube/cautious-journey/maintainability)
[](https://codeclimate.com/github/ssube/cautious-journey/trends/technical_debt)
[](https://codeclimate.com/github/ssube/cautious-journey/issues)
[](https://lgtm.com/projects/g/ssube/cautious-journey/context:javascript)
[](https://lgtm.com/projects/g/ssube/cautious-journey/alerts/)## Releases
[](https://github.com/ssube/cautious-journey/releases)
[](https://github.com/ssube/cautious-journey/releases)
[](https://github.com/ssube/cautious-journey/compare/v0.1.0...master)[](https://www.npmjs.com/package/cautious-journey)
[](https://www.npmjs.com/package/cautious-journey)
[](https://www.npmjs.com/package/cautious-journey)## Usage
cautious-journey can be installed as a Docker image or an npm package:
```shell
> docker pull ssube/cautious-journey
> yarn global add cautious-journey
```### Running with Docker
```shell
> docker run --rm --it ssube/cautious-journey --helpUsage: cautious-journey [options]
Commands:
index.js graph-labels graph label state changes
index.js sync-issues sync issue labels
index.js sync-projects sync project labelsOptions:
--help Show help [boolean]
--version Show version number [boolean]
--config, -c [string] [required]
--dryrun, -d [boolean] [default: true]
--project, -p [array]
```Docker provides a single output stream, regardless of logger configuration. When running `graph-labels`, turning
the `logger.level` to `warn` or `error` will suppress log messages that could confuse `dot`.### Running with Yarn
```shell
$(yarn global bin)/cautious-journey --help
```Yarn will install a copy of the latest `cautious-journey` package into your `$(yarn global dir)` path.
### Logging with Bunyan
```shell
$(yarn global bin)/cautious-journey sync-issues | $(yarn global bin)/bunyan
```Piping logs through `bunyan` will pretty-print the JSON records that `cautious-journey` emits. When running with
`docker`, note that all program output will be combined into a single stream.You can also use `jq` to format or filter messages. Logs are line-delimited JSON.
### Graphing with GraphViz
```shell
$(yarn global bin)/cautious-journey graph-labels | dot -Tpng -o /tmp/labels.png
sensible-browser /tmp/labels.png
```More details can be found in the [getting started guide](./docs/getting-started.md#graphing).
## Build
cautious-journey is built with `make`, `node`, and `yarn`. The [developer guide](./docs/dev.md#setup) has steps
for installing these, or you can use a container that provides them.Node 12 or better is required, along with Yarn 1.x or better.
## License
Released under [the MIT license](./LICENSE.md).