ãã¼ã ã§ä½æ¥ããåããªãã¸ããªã®ä¸ã§ Pull Request ãéãåãã®ã§ã¯ãªãããªã¼ãã³ã½ã¼ã¹ããã¸ã§ã¯ãã«å¤é¨ãã PR ããã£ã¦ããå ´åã®è©±ã§ãã
æè¿ã®ããã¼
éããã¦ãã PR ã«å¯¾ãã¦ã¯ã大ã¾ãã«ã¯ä»æ§ã®è©±ãå®è£ æ¹éã®è©±ãå ·ä½çãªå®è£ ã®è©±ãè©°ããªãããã¼ã¸ã§ããããã«æã£ã¦ããããã ããã©ããããã»ã¨ãã©æºè¶³ããç¶æ ã«ãªã£ã¦ãã¦ãã¼ã¸ãããã¨æãã¿ã¤ãã³ã°ã«ãªã£ã¦ããå¤æ°ã®ååä»ãã ã¨ããã¡ãã£ã¨ããå¦çã®æ¸ãæ¹ã ã¨ãã§ãç¸æã«ãé¡ãããããã¯èªåã§æãå ãã¦ãããã¼ã¸ããæ¹ãæã£åãæ©ããã¨ããããããããæ㯠PR å ã®ãã©ã³ããæå ã«ãã§ãã¯ã¢ã¦ããã¦ããã®ãã©ã³ããèªåã®å¤æ´ã§é²ããä¸ã§ master ã«ãã¼ã¸ããããã«ããã¨ãpush æã« PR ãéãããã¦ä¾¿å©ã§ãã
motemen/lgtm.sh#1 ã®ä¾ãåããã«ãããã©ãPR ã«ããã« 1 ã³ããã足ãã¦ãããã¼ã¸ãã¦ãã
ãã®éã³ã¼ã㯠fork ãããå¤é¨ã®ãªãã¸ããªã«ãããããããã« git checkout ããã°ããããã§ã¯ãªãäºã git fetch ãªãããå¿ è¦ãããã
ã§ãæè¿ãããã試è¡é¯èª¤ããçµæã以ä¸ã®ããã«ããã¨ããããã ã£ãã
1. ãã©ã¼ã¯ããããªãã¸ããªãããã®ãªã¼ãã¼å㧠remote ã«ç»é²ãã
git remote add -f jwerle https://github.com/jwerle/lgtm.sh.git
-f
ãªãã·ã§ã³ã§ãç»é²å¾ git fetch ããã
2. PR å ã®ãªã¢ã¼ããã©ã³ããããã¼ã«ã«ã«ãã§ãã¯ã¢ã¦ããã
git checkout -b '#1-jwerle/master' --track remotes/jwerle/master
ãã®é #xxx ããã©ã³ãåã«å
¥ãã¦ããã¨ãã³ãããã¡ãã»ã¼ã¸ãªã©ã«ãã©ã³ãåãå
¥ã£ãæã«èªåçã«ãªã³ã¯ã«ãªã£ã¦ä¾¿å©ï¼ããããããã¨ã« #
ã¯ãã©ã³ãåã«ä½¿ããï¼ãã¾ãããã®ãã©ã³ã㧠git pull ããã¨ãPR ãæ´æ°ãããã¨ãã«ææ°ã®ã³ã¼ããåå¾ã§ããã
3. ãã¼ã«ã«ã«ãã§ãã¯ã¢ã¦ãããããã©ã³ãã® push å ãèªåã®ãªãã¸ããªã«å¤æ´
git config --local 'branch.#1-jwerle/master.pushremote' origin
ããã§ããã®ãã©ã³ããå¤æ´ããã¨ãã«ãèªåã®ãªãã¸ããªã« push ãããã¨ãã§ããããã®è¨å®å¾ãä¾ç¶ã¨ã㦠git pull ã¯ç¸æã®ãªãã¸ããªããè¡ãããã
hub-pr
ä¸åº¦ä»¥ä¸ã®ããã«ãã¦ãã¾ãã¨çµæ§ä¾¿å©ãªããã ãã©ãã»ããã¢ããã«å°ãé¢åããããæè¿ PR ãåãåããã¨ãéãªã£ããã¨ãããããã®ã¸ãã®ä½æ¥ã¯ããããã¼ã決ã¾ã£ã¦ãã®ã§ã³ãã³ãåãããã¨ã«ããããã³ãã¯ã¡ãã£ã¨ããã·ã§ã«ã¹ã¯ãªããã«åããã¤ããã ã£ãã®ã ãã©ããªããè²æ°ãåºãã¦ãã¾ã£ãâ¦â¦ãyak shaving ã ãã人çã ã
go get github.com/motemen/hub-pr
ã§å
¥æã§ãã¾ãã
使ãæ¹
hub-pr checkout PULL_REQUEST_NUMBER
PR çªå·ãä¸ããã¨ã以ä¸ã«æ¸ããããã¼ã§ãã©ã³ããä½ã£ã¦ããããzsh ç¨ã®è£å®ãç¨æãã¦ãã®ã§ä»¥å¤ã¨ç°¡åãªã®ã§ãã
ãã¨ã¯æ®éã«ãã¼ã¸ãã¦ããã°ããã®ã ãã©ãæå ã§ãã¼ã¸ããã¨ãã® GitHub ããªãã¿ã®ãã¼ã¸ã¡ãã»ã¼ã¸ã«ãªããªãã®ã§ãããã¨åããã®ãçæããã³ãã³ããç¨æãã¦ãããã
hub-pr merge BRANCH
ããã§ãããããã¼ã¸ãã¿ã³ãæ¼ãããã®ãããªã³ãããã¡ãã»ã¼ã¸ã§ãã£ã¦ãã¼ã¸ããã¾ãããªãã便å©ã§ãããã»ãã«ã hub-pr browse ã£ã¦ãã便å©ãªã®ãããã¾ããããªãã±ã§ããã³ã³ã½ã¼ã«ãã PR ãã¤ã·ã¥ã¼ãæ±ããªããghi ã£ã¦ã®ãå§åçã«ä¾¿å©ã
ãã®ããã¼ã§ä½æ¥ãããã¨æã人ããããã©ããã¯åããã¾ãããâ¦â¦ãã©ãããå©ç¨ä¸ãããverbose output çãªãªãã·ã§ã³ããªãã®ã§ããã¨ãã©ãã¯ããã¯ã¹æãé«ãã
Go 㧠GitHub ç¨ã®ãã¼ã«ãæ¸ãæ㯠github.com/github/hub 以ä¸ã®ããã±ã¼ã¸ã使ãã¨ãªããªãå¿«é©ã«è¡ããããã§ãããã¾ãããããããã
GitHubå®è·µå ¥é ~Pull Requestã«ããéçºã®å¤é© (WEB+DB PRESS plus)
- ä½è : 大å¡å¼è¨
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2014/03/20
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- ãã®ååãå«ãããã° (18件) ãè¦ã