ããã¸ã§ã¯ãã§ã¯ãdevelop
branchã§éçºãè¡ããæ¬çªãªãªã¼ã¹ãããã¯å
¬éããã¨ãã«master
branchã¸åæ ããã¨ããããã¼ãã¨ã£ã¦ãã¾ãã
ãã®ã¨ããdevelop
branchä¸ã§ä¸è¦ãªãã¡ã¤ã«ãåé¤ããããããã¥ã¡ã³ãä¸ã®ç¹å®ã®åèªãç½®æããä¸ã§master
ã«åæ ãã¾ããããããæ³åã®éãããããã®ä½æ¥ãæåã§è¡ã£ã¦ãããããè²ã
ã¨ãã¹ãããã¡ã§ããããã®ãããããããèªååããããã«ãã¾ããã
èªååã¹ã¯ãªãã
æåã«èªååé¨åã®æ ¸ã示ãã¨ã以ä¸ã®å®è£ ã«ãªãã¾ããé常ã«åç´ãªå 容ã§ããã
function create_merge_request { local version=${1:?"version is missing"} local branch="bump/${version}" # ãããã¬ãã«ã®ãã£ã¬ã¯ããªã¸ç§»å pushd $(git rev-parse --show-toplevel) git checkout -b ${branch} # MR ç¨ã® branch ãä½æ # ãã®ã¸ãã§ä¸è¦ãªãã¡ã¤ã«ãåé¤ããããã # ... # ... git commit -m "bump version to ${version}" git push origin ${branch} # MR ã®ä½æ lab mr create origin master \ --label release \ --remove-source-branch \ --message "bump version to ${version}" \ --message "# History" \ --message "<ul>$(git log --oneline master..${branch} | perl -ple 's/^/<li>/' | tr -d '\n')</ul>" popd } create_merge_request ${VERSION}
lab
ã³ãã³ã
ãããã£ãèªååãè¡ãããã«ã¯ãCLIã¯ã©ã¤ã¢ã³ããéµã«ãªãã¾ãã
GitHubã«ã¯ghãhubã³ãã³ããããã¾ãããGitLabã«ãããã¤ãã®ãã¼ã«ãåå¨ãã¦ãããå ¬å¼ã§ãç´¹ä»ããã¦ãã¾ãã
ä»åå©ç¨ããã®ã¯labã³ãã³ãã§ãã
lab
ã³ãã³ãã§ã¯ã以ä¸ã®ããã«issueãMRã®æä½ãªã©ãå®ç¾ã§ãã¾ãã
$ lab help | tail -11 These GitLab commands are provided by lab: ci Work with GitLab CI pipelines and jobs completion Generates the shell autocompletion fork Fork a remote repository on GitLab and add as remote issue Describe, list, and create issues label List and search labels mr Describe, list, and create merge requests project Perform project level operations on GitLab snippet Create a personal or project snippet
XDG Base Directoryã®~/.config/lab/lab.toml
ãç°å¢å¤æ°ã§ã¢ã¯ã»ã¹ãã¼çãè¨å®ããã°åä½ãã¾ããã¼ãã¯æä½éã¨ãããã¨ã§ä»¥ä¸ãè¨å®ãã¦ãã¾ãã
env | grep '^LAB' LAB_CORE_TOKEN=xxxxxxxxxxxxxxxxxxx LAB_CORE_HOST=https://gitlab.com
å°ã£ãã¨ãã
MRã®ä½æã¯lab help mr create
ã§è¡ããã¨ãã§ããè¤æ°ã®--message
ãªãã·ã§ã³ã§ã¿ã¤ãã«ã¨æ¬æãæå®ã§ããä»æ§ã«ãªã£ã¦ãã¾ãã
å®è£
ã確èªããã¨ãæåã®--message
ã§æå®ããå
容ãMRã®ã¿ã¤ãã«ã«ã以å¾ã®--message
ã§æå®ããå
容ãæ¬æã«ãªãã¾ãã
å°ã£ãç¹ãä½ãã¨ããã¨ã1ã¤ã®--message
ã«ã¦æå®ããæååã«æ¹è¡ãå«ãå ´åãæ¹è¡ã®åã®æååããèªèãã¦ãããªãã¨ãããã¨ã§ãã
develop
ã¨master
ã®å·®åãMRã®æ¬æã«åºãããã£ãã®ã§ãä»ã¯ãããªå¾®å¦ãªãã¨ããã¦ãã¾ãã
--message "<ul>$(git log --oneline master..${branch} | perl -ple 's/^/<li>/' | tr -d '\n')</ul>"