{"id":18765826,"url":"https://github.com/yeqown/gitlab-flow","last_synced_at":"2025-04-13T05:30:44.740Z","repository":{"id":46339537,"uuid":"329214510","full_name":"yeqown/gitlab-flow","owner":"yeqown","description":"A CLI tool to help manage the flow of developing on gitlab.","archived":false,"fork":false,"pushed_at":"2024-11-24T07:09:20.000Z","size":860,"stargazers_count":17,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T22:11:43.247Z","etag":null,"topics":["branch-modelling","command-line","git","gitlab","gitlab-flow","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yeqown.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-13T06:27:35.000Z","updated_at":"2025-03-05T06:14:00.000Z","dependencies_parsed_at":"2024-06-26T07:32:22.216Z","dependency_job_id":"cab2ee3f-8832-4186-a474-2f5da642c9f7","html_url":"https://github.com/yeqown/gitlab-flow","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeqown%2Fgitlab-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeqown%2Fgitlab-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeqown%2Fgitlab-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeqown%2Fgitlab-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeqown","download_url":"https://codeload.github.com/yeqown/gitlab-flow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670273,"owners_count":21142895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["branch-modelling","command-line","git","gitlab","gitlab-flow","go"],"created_at":"2024-11-07T18:36:52.910Z","updated_at":"2025-04-13T05:30:44.717Z","avatar_url":"https://github.com/yeqown.png","language":"Go","readme":"\u003cimg align=\"center\" src=\"./assets/gitlab-flow-branch.svg\"\u003e\n\n# gitlab-flow\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/yeqown/gitlab-flow)](https://goreportcard.com/report/github.com/yeqown/gitlab-flow) [![go.de\n│ v reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/github.com/yeqown/gitlab-flow)\n\n[中文文档](./README.zh-CN.md)\n\nA CLI tool to help manage the flow of developing on gitlab. The difference between this and `git-flow` is that \n`gitlab-flow` would operate remote(gitlab) resources like: milestone, issue, merge request and branch. Importantly,\nif your team using `gitlab-flow` together, `gitlab-flow` could help you to synchronize others development data by\nusing `milestoneId` or interactive mode. \n\n\u003cimg src=\"./assets/intro.svg\" width=\"100%\"/\u003e\n\n### Installation \n\n#### 1. Applying a gitlab application \n\nBefore you install `gitlab-flow`, you need apply a gitlab application on your gitlab server.\n\n1. Go to your gitlab `Preferences` -\u003e `Applications`.\n2. Input `Name` and `Redirect URI` (http://localhost:2333/callback).\n3. Choose scopes: `api`, `read_user`, `read_repository`, `read_registry`.\n4. Click `Save application`.\n5. Copy `Application Id` and `Secret`.\n\n#### 2. Compile your AppId and AppSecret into binary\n\n\u003e Currently, there is no precompiled binary to install directly, since `gitlab-flow` compiled\n\u003e `AppId` and `AppSecret` into binary. So you need to compile by yourself.\n\nNow, you got `Application Id` and `Secret`.\n\nThere is no precompiled binary to install directly, so you need to install by yourself.\n\n```shell\nAPP_ID=YOUR_GITLAB_APP_ID \\\nAPP_SECRET=YOUR_GITLAB_APP_SECRET \\\nBIN=gitlab-flow \\ # or any name you like\nbash install.sh\n```\n\n#### 3. Check installation\n\nAfter installation, run following command to check if `gitlab-flow` is installed successfully.\n\n```shell\n$ which gitlab-flow\n# /path/to/home/.go/bin/gitlab-flow\n```\n\n#### 4. Initialize gitlab-flow\n\nAfter installation, you need to configure `gitlab-flow` by running `init` subcommand. This is a interactive command,\nit will ask you some questions to generate a configuration file and a sqlite database file.\nThe home directory of `gitlab-flow` is `~/.gitlab-flow`.\n\n```shell\n$ gitlab-flow config init\n```\n\n\u003e NOTICE: `gitlab-flow` will request OAuth2 credentials from your gitlab server, \n\u003e so you need to make sure your gitlab server is accessible.\n\u003e \n\u003e And if you are running `gitlab-flow` in a headless environment, **DO** choose **MANUAL** mode on\n\u003e OAuth2 authorization mode.\n\nFinally, all should be done. You can use `gitlab-flow` to manage your gitlab project.\n\n### How to use\n\n\u003e This section assumes that you have installed `gitlab-flow` successfully.\n\n#### 1. Sync Project or Milestone\n\nBefore you start to manage your project branch flow, you need to make sure the project has stored in local database.\n\n\u003e Sync milestone from gitlab server would help team partners to get the latest milestone information to local database.\n\n```shell\n# sync project\n$ gitlab-flow sync project\n\n# sync milestone interactively\n$ gitlab-flow sync milestone --interact/-i\n```\n\n#### 2. Start/manage a feature\n\nAfter you sync project you can start/manage a feature flow as below:\n\n```shell\n# start a feature, gitlab-flow will create a branch and milestone for you.\n$ gitlab-flow feature open v1.0.0 \"We start a milestone v1.0.0\"\n\n# fork a issue and branch\n$ gitlab-flow feature open-issue \"little feature\" \"this is a little feature\"\n\n# finish a issue, MAKE SURE you are on the issue branch\n$ gitlab-flow feature close-issue\n\n# finish a feature, MAKE SURE you are on the feature branch\n$ gitlab-flow feature release/dev/test\n```\n\nThe `hotfix` flow would be similar to `feature` flow, you can refer to IMAGE which shows the branch flow of `gitlab-flow`.\n\n### Bash/Zsh Completion\n\n`gitlab-flow` using urfave/cli, so you can use `complete` command to generate completion script.\n\n1. Download urfave/cli completion script to a file from [auto-completion](https://github.com/urfave/cli/tree/main/autocomplete)\n2. Copy the content of the file to your shell folders.\n3. Source the file in your shell profile file.\n\n```shell\n# zsh completion for example\n# download completion script\ncurl -L https://raw.githubusercontent.com/urfave/cli/master/autocomplete/zsh_autocomplete -o ~/.oh-my-zsh/cache/completions/gitlab-flow\n\n# source the file in your .zshrc\necho \"source ~/.oh-my-zsh/cache/completions/gitlab-flow\" \u003e\u003e ~/.zshrc\n\n# activate the completion\nsource ~/.zshrc\n```\n\nMore help information, you can find in [urfave/cli](https://cli.urfave.org/v2/examples/bash-completions/) bash completion.\n\n\n### Access Token\n\n***❗️❗️❗️NOTICE: since `1.7.0` gitlab-flow use OAuth2 access token instead of personal access token.***\n\n\u003e !!! Before initialize gitlab-flow, you must have a custom-compiled gitlab-flow executable binary \n\u003e which contains appId and appSecret of gitlab application on your gitlab server.\n\nAfter you initialize gitlab-flow on your machine, it will automatically request OAuth credentials\nfrom your gitlab server.\n\n\u003e Host: The domain of your gitlab server. such as https://git.example.com \n\u003e \n\u003e API Host: The API path to your gitlab server. such as: https://git.example.com/api/v4/. \n\u003e You can find it in:\n[https://git.example.com/help/api/README.md](https://git.example.com/help/api/README.md).\nThis page provide some example for you to request gitlab API, so you got host.\n\n### CLI Help  \n\n```shell\n ________  ___  _________  ___       ________  ________          ________ ___       ________  ___       __\n|\\   ____\\|\\  \\|\\___   ___\\\\  \\     |\\   __  \\|\\   __  \\        |\\  _____\\\\  \\     |\\   __  \\|\\  \\     |\\  \\\n\\ \\  \\___|\\ \\  \\|___ \\  \\_\\ \\  \\    \\ \\  \\|\\  \\ \\  \\|\\ /_       \\ \\  \\__/\\ \\  \\    \\ \\  \\|\\  \\ \\  \\    \\ \\  \\\n \\ \\  \\  __\\ \\  \\   \\ \\  \\ \\ \\  \\    \\ \\   __  \\ \\   __  \\       \\ \\   __\\\\ \\  \\    \\ \\  \\\\\\  \\ \\  \\  __\\ \\  \\\n  \\ \\  \\|\\  \\ \\  \\   \\ \\  \\ \\ \\  \\____\\ \\  \\ \\  \\ \\  \\|\\  \\       \\ \\  \\_| \\ \\  \\____\\ \\  \\\\\\  \\ \\  \\|\\__\\_\\  \\\n   \\ \\_______\\ \\__\\   \\ \\__\\ \\ \\_______\\ \\__\\ \\__\\ \\_______\\       \\ \\__\\   \\ \\_______\\ \\_______\\ \\____________\\\n    \\|_______|\\|__|    \\|__|  \\|_______|\\|__|\\|__|\\|_______|        \\|__|    \\|_______|\\|_______|\\|____________|\n\nNAME:\n   gitlab-flow - CLI tool\n\nUSAGE:\n   flow2 [global options] command [command options] [arguments...]\n\nVERSION:\n   v1.8.0\n\nDESCRIPTION:\n   A tool for managing gitlab Feature/Milestone/Issue/MergeRequest as gitlab-flow.\n\nAUTHOR:\n   yeqown \u003cyeqown@gmail.com\u003e\n\nCOMMANDS:\n   config   show current configuration\n   feature  managing the works in developing.\n   hotfix   managing the works in hotfix.\n   dash     overview of local development\n   sync     synchronize resource from remote gitlab server\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --cwd path/to/file                     choose which path/to/file to load (default: /Users/yeqown/projects/opensource/gitlab-flow)\n   --debug                                verbose mode (default: false)\n   --project projectName, -p projectName  input projectName to locate which project should be operate. (default: gitlab-flow)\n   --force-remote                         query project from remote not from local. This should be used when project name is duplicated, and could not found from local. (default: false)\n   --web                                  open web browser automatically or not (default: false)\n   --help, -h                             show help (default: false)\n   --version, -v                          print the version (default: false)\n```\n\n### [Documents](./docs/README.md)\n\nThis section records the documents of `gitlab-flow`, including the design, the usage, the development and the release.\n\n### [Changelog](./CHANGELOG.md)\n\nCHANGELOG.md records the changes of each version. ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeqown%2Fgitlab-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeqown%2Fgitlab-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeqown%2Fgitlab-flow/lists"}