https://github.com/linuxsuren/gogit
Sending build status to different git providers
https://github.com/linuxsuren/gogit
Last synced: 10 months ago
JSON representation
Sending build status to different git providers
- Host: GitHub
- URL: https://github.com/linuxsuren/gogit
- Owner: LinuxSuRen
- License: mit
- Created: 2022-11-30T02:50:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-03T13:13:10.000Z (about 1 year ago)
- Last Synced: 2025-04-30T17:09:53.751Z (10 months ago)
- Language: Go
- Homepage:
- Size: 208 KB
- Stars: 16
- Watchers: 2
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://codecov.io/gh/LinuxSuRen/gogit)
`gogit` could send the build status to different git providers. Such as:
* GitHub
* Gitlab (public or private)
## Usage
### Generate commit message with AI
```shell
export AI_PROVIDER=your-one-api-server-address
export ONEAPI_TOKEN=your-one-api-token
gogit commit
```
It supports [one-api](https://github.com/songquanpeng/one-api) only.
### Checkout to branch or PR
Ideally, `gogit` could checkout to your branch or PR in any kind of git repository.
You can run the following command in a git repository directory:
```shell
gogit checkout --pr 1
```
### Send status to Git Provider
Below is an example of sending build status to a private Gitlab server:
```shell
gogit status --provider gitlab \
--server http://10.121.218.82:6080 \
--repo yaml-readme \
--pr 1 \
--username linuxsuren \
--token h-zez9CWzyzykbLoS53s
```
Or in the following use cases:
* [Tekton Task](https://hub.tekton.dev/tekton/task/gogit)
### Send a notification to DingDing
Below is an example of sending a notification to DingDing based on the Gitlab/GitHub pull request author/reviewers/assignees:
```shell
gogit pr --provider gitlab \
--server http://10.121.218.82:6080 \
--repo yaml-readme \
--pr 1 \
--username linuxsuren \
--token h-zez9CWzyzykbLoS53s \
--msg 'workflow done' \
--dingding-tokens linuxsuren=dingdingtoken
```
## Argo workflow Executor
Install as an Argo workflow executor plugin:
```shell
cat <