Issue 㨠PR ã®ãã³ãã¬ã¼ãã¸ã§ãã¬ã¼ã¿ã¤ãã£ã
åºå¼µã®å¸°ãã®ãã©ã¤ãã10æé以ä¸ãã£ãã®ã§ç°¡åãªãã¼ã«ãã¤ãã£ã¦ã¿ã¾ããï¼
ä½è«ã§ãã Windows PC ãããªãã£ãã®ã§ï¼Windows PC + golang + gVim ã§æ¸ãã¦ã¿ã¾ããï¼Go è¨èªã¯æ¨æºã©ã¤ãã©ãªã ãã§ãããããæ¸ãã¦ãªããªãè¯ãã§ããï¼ä¹ ã ã® Windows ã§ã®ã³ã¼ãã£ã³ã°ã§ãããç¹ã«åé¡ããã¾ããã§ããï¼
GitHub ã® issue/PR ãã³ãã¬ã¼ãæ©è½
æè¿ issue / PR ã®ãã³ãã¬ã¼ãæ©è½ãå®è£
ãããã¿ããã§ãï¼ãªãã¸ããªç´ä¸ã .github
ãã£ã¬ã¯ããªã®ã©ã¡ããã« ISSUE_TEMPLATE.md
ããã³ PULL_REQUEST_TEMPLATE.md
ãç½®ãã¦ããã¨ï¼issue ã PR ä½ææã«ãã®ãã³ãã¬ã¼ããå
¥åãã©ã¼ã ã«ããã©ã«ãã§ã»ããããã¾ãï¼
Issue and Pull Request templates - GitHub Blog
ã¾ãï¼ä»¥åãããã CONTRIBUTING.md
ã .github
ãã£ã¬ã¯ããªã®ä¸ã«ç½®ããããã§ãï¼
.github
ãã£ã¬ã¯ããªãçæããã³ãã³ã dot-github
åã ããã»ãããªã¼ã¨æã£ã¦ããæ©è½ã ã£ãã®ã§ãã£ãã使ãããã¨ããã§ããï¼æ¯åº¦ä¼¼ããããªãã³ãã¬ã¼ããåãªãã¸ããªã«ã¤ããã®ãæéã ãªãã¨ãããã¨ã§ãã³ãã¬ã¼ãã¸ã§ãã¬ã¼ã¿ãã¤ããã¾ããï¼ããã§å ã«ãªããã¡ã¤ã«ã ã dotfiles ãªãã§ç®¡çãã¦ããã°ï¼ä»ã® PC ãªã©ããã§ãä¸çºã§ãã³ãã¬ã¼ããçæã§ãã¾ãï¼
ä¸è¨ã®ããã« go get
ããã¨ã¤ã³ã¹ãã¼ã«ã§ããã¨æãã¾ãï¼
$ go get github.com/rhysd/dot-github
ãã³ãã¬ã¼ã㯠~/.github
å
ã«ç½®ãã¾ãï¼ä»ã®å ´æã«ç½®ãããã¨ã㯠$DOT_GITHUB_HOME
ç°å¢å¤æ°ãã»ãããããã¨ã§ç½®ãå ´æãå¤æ´ã§ãã¾ãï¼
~/.github
å
ã«ç½®ãããã³ãã¬ã¼ãçæãã¡ã¤ã«ã¯æ¬¡ã®éãã§ãï¼ãã¡ã¤ã«ãåå¨ããªãå ´åã¯åç´ã«çæãã¹ããããã¾ãï¼
ãã¡ã¤ã«å | 説æ |
---|---|
ISSUE_TEMPLATE.md |
Issue ç¨ã«ä½¿ããããã³ãã¬ã¼ã |
PULL_REQUEST_TEMPLATE.md |
PR ç¨ã«ä½¿ããããã³ãã¬ã¼ã |
ISSUE_AND_PULL_REQUEST_TEMPLATE.md |
Issue ããã³ PR ã§ä¸è¨ã®ãã³ãã¬ã¼ããç¡ãå ´åã«ä½¿ãããå ±éã®ãã³ãã¬ã¼ã |
CONTRIBUTING.md |
ã³ã³ããªãã¥ã¼ãã¬ã¤ãã©ã¤ã³ç¨ã®ãã³ãã¬ã¼ã |
dot-github
ã³ãã³ãã«ãã£ã¦ä¸è¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«ãããªãã¸ããªå
ã« .github
ãèªåçæããã¾ãï¼
$ cd your-repo $ dot-github
.github
å
ã«çæããããã¡ã¤ã«ã¯ Go è¨èªæ¨æºã® text/template
ãã³ãã¬ã¼ãã使ã£ã¦ãã³ãã¬ã¼ãçæãã¡ã¤ã«ããçæããã¾ãï¼
Package template - The Go Programming Language
æ¨æºã®æ©è½ã«å ãã¦ï¼ä¸è¨ã®å¤æ°ã使ç¨å¯è½ã§ãï¼
å¤æ°å | å | 説æ |
---|---|---|
.IsIssue |
boolean | ISSUE_TEMPLATE.md ã¨ãã¦å±éãããæã« True |
.IsPullRequest |
boolean | PULL_REQUEST_TEMPLATE.md ã¨ãã¦å±éãããæã« True |
.IsContributing |
boolean | CONTRIBUTING.md ã¨ãã¦å±éãããæã« True |
.RepoName |
string | ãªãã¸ããªå |
.RepoUser |
string | ãªãã¸ããªææè ã®åå |
text/template
ã® {{if}}
ãªã©ã使ã£ã¦éè¤ãçã㦠issue 㨠PR å
±ç¨ã®ãã³ãã¬ã¼ããæ¸ãã¦ãè¯ãã§ããï¼æåããå¥ã
ã«ãã³ãã¬ã¼ããæ¸ãã¦ãè¯ãã§ãï¼
çæä¾
使ç¨ãããã³ãã¬ã¼ã
~/.github/ISSUE_AND_PULL_REQUEST_TEMPLATE.md
{{if .IsIssue}} ### Expected Behavior ### Actual Behavior {{end}} {{if .IsPullRequest}} ### Fix or Enhancement? - [ ] All tests passed {{end}} ### Environment - OS: Write here - Go version: Write here
~/.github/CONTRIBUTING.md
Thank you for contributing to {{.RepoName}}! ========================================= Please follow issue/PR template.
çæããããã¡ã¤ã«
/path/to/your-repo/.github/ISSUE_TEMPLATE.md
### Expected Behavior ### Actual Behavior ### Environment - OS: Write here - Go version: Write here
/path/to/your-repo/.github/PULL_REQUEST_TEMPLATE.md
### Fix or Enhancement? - [ ] All tests passed ### Environment - OS: Write here - Go version: Write here
/path/to/your-repo/.github/CONTRIBUTING.md
Thank you for contributing to my-project! ========================================= Please follow issue/PR template.
ã¾ã¨ã
GitHub ã«è¿½å ããã issue / PR ãã³ãã¬ã¼ãæ©è½ããã£ã¨ä½¿ããããã«ã¸ã§ãã¬ã¼ã¿ãã¤ãã£ã¦ã¿ã¾ããï¼Go è¨èªã®æµåã«åã£ã¦ã¡ããã¨ãã¹ããæ¸ãã¦ã¿ãã®ã§ï¼åã¿ããã«ãªãã¸ããªã¤ããã¾ãã£ã¦æ¯åº¦ãããããã³ãã¬ã¼ãæ¸ãã®ãããã©ãã¿ãããªäººã¯ãã²ã¨ãã試ããã ããï¼
yak shaving æ°å³ã§ããï¼å¢ãããã£ãã®ã§ã¤ãã£ã¦ãã¾ãã¾ããï¼æ°å¹¹ç·å ã¨ãé£è¡æ©å ã ã¨å²ã¨æãåããããã®ã¯ã©ããã¦ãªãã§ããããâ¦