Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dronetag/gira
Git'n'JIRA observe changes in dependencies (via reqs/lock files) and extract JIRA tickets from their commit history
https://github.com/dronetag/gira
Last synced: 12 days ago
JSON representation
Git'n'JIRA observe changes in dependencies (via reqs/lock files) and extract JIRA tickets from their commit history
- Host: GitHub
- URL: https://github.com/dronetag/gira
- Owner: dronetag
- Created: 2024-01-29T13:53:46.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-12-06T12:23:47.000Z (about 1 month ago)
- Last Synced: 2024-12-06T13:49:00.175Z (about 1 month ago)
- Language: Python
- Size: 112 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
Awesome Lists containing this project
README
# Gira
Gira reacts to changes in your dependency files and bring you JIRA tickets mentioned in commits between current and updated version of the dependencies. Supported dependency files are
- pyproject.toml
- west.yaml/yml
- pubspec.yaml/ymlGira is especially useful with [pre-commit](https://pre-commit.com) but is great for changelog enhancements when called as `gira --format markdown -r `
__Pssst__: works the best if your dependencies follow [semantic release](https://semantic-release.gitbook.io/semantic-release/) thus have tags in `vX.Y.*` format.
## Usage - standalone
```bash
gira [-r revision] [-c config] [--format="commit|detail|markdown"]
```Revision can be tag, branch, or a commit. By default `gira` check for staged/unstaged changes and if no are found then it diffs to the previous commit. This is the way to tell `gira` to diff to a different tag (for example).
Format can be short or detailed. Detailed formats will try to reach to your JIRA server for the details. The short (default) version is useful as suffix to
commit messages. The markdown version is intended for changelogs.```bash
$ gira [--format=commit]
internal-dependency1 => : JIRA-123, JIRA-567
other-followed-lib => : JIRA-876, JIRA-543
```Config file is by default _.gira.yaml_ but can be pretty much any YAML or pyproject.toml. See section bellow.
## Usage - Pre-commit
```bash
$ pip install pre-commit
$ pre-commit install -t prepare-commit-msg -t pre-commit -t commit-msg
```Add to your .pre-commit-config.yaml
```yaml
- repo: https://github.com/dronetag/gira
rev: v1.0.1
hooks:
- id: gira
# if you use other config than .gira.yaml then
# args: ["-c", "your-config.yaml"]
```## Configuration
Gira is configured either by pyproject.toml or standalone .gira.yaml or actually any other
YAML file that you specify with `-c` and has "gira.observe" and optionally "gira.jira" keys.### Observed Dependencies
Observed dependencies are in form of NAME=git-url where NAME must be the same as specified in your dependency/lock file.
```toml
[tool.gira.observe]
internal-lib1 = "github.com/company/internal-lib1"
other-dependency = "bitbucket.com/company/other-dependency"
```
or
```yaml
gira:
observe:
internal-lib1: "github.com/company/internal-lib1"
other-dependency: "bitbucket.com/company/other-dependency"
```### Submodules
Submodules are automatically added into observed dependencies. You can turn off support
for submodules by settings `gira.submodules=false` in your config file.### JIRA (optional)
Example of a YAML configuration file section for JIRA (for pyproject.toml use `tool.gira.jira`).
Token and email can be passed via environment variables `JIRA_TOKEN` or `GIRA_JIRA_TOKEN` and
`JIRA_EMAIL` or `GIRA_JIRA_EMAIL`.```yaml
jira:
url: jira.yourcompany.com
token: token
email: [email protected]
```Setting JIRA connection information allows for "detailed" and "markdown" formatting of the output
as follows:```bash
$ gira
internal-dependency1 => :
JIRA-123: details about the issue (url)
JIRA-567: details about the issue (url)
```