Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmks/gira
Manage git branches with Jira information
https://github.com/jmks/gira
git go jira jira-rest-api
Last synced: about 2 months ago
JSON representation
Manage git branches with Jira information
- Host: GitHub
- URL: https://github.com/jmks/gira
- Owner: jmks
- License: mit
- Created: 2019-11-29T04:10:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-25T22:50:45.000Z (about 3 years ago)
- Last Synced: 2024-10-14T22:19:45.091Z (3 months ago)
- Topics: git, go, jira, jira-rest-api
- Language: Go
- Size: 61.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gira
A tool for managing *GI*t branches with ji*RA*.
Pronounced "gear-ra" (g like "git" or "gif" :trollface:)
## Description
I frequently have many feature branches. However, CI/Github actions may rebase the feature branch before it is merged to mainline.
Thus, I have many local branches that are not merged into mainline that I would like to remove, with the knowledge the issue is done.Even if Jira is not configured, or the branch is not tracked in Jira, `gira` can still help you multi-select branches to be deleted.
![](/screenshot.png?raw=true "Selection screen")
## Configuration
Configure with Environment Variables or a Configuration File. Note that the Environment values will override the Configuration File values.
### Environment Variables
| Variable | Value |
| ------------- | ------------- |
| GIRA_JIRA_ISSUE_PATTERN | A pattern for identifying a Jira Issue key from a branch name e.g. PM-1701-my-feature-branch has the pattern 'PM-\d+' |
| GIRA_JIRA_TOKEN | Jira API TOKEN |
| GIRA_JIRA_USER | User of the Jira API token e.g. an email address |
| GIRA_JIRA_URL | Jira base URL e.g. https://issues.apache.org/jira/ |### Configuration File
Uses the configuration file `.gira.toml` (technically, the format can be any understood by [viper](https://github.com/spf13/viper#reading-config-files)).
`gira` will first look in the current directory for `./.gira.toml`, then at `$HOME/.config/.gira.toml`.
Look at the TOML [sample](/.gira.sample.toml).
Note that if you copy the example, to rename the file as described above, e.g. `cp .gira.sample.toml ./.gira.toml`
## TODO
* Add a log to a file
* Add config/option to skip certain branches (e.g. `master,main,dev,prod`)
* Create a [worker pool](https://gobyexample.com/worker-pools) for Jira requests
* Show `git ls-remotes` info in delete UI
* Move branch delimiter to configuration
* Move branch naming pattern to configuration
* Update README with gif
* Add more tests :crying_cat_face:
* configure command to set configuration## License
This project is released under the terms of the [MIT license](http://en.wikipedia.org/wiki/MIT_License).