{"id":13604024,"url":"https://github.com/rhysd/dot-github","last_synced_at":"2025-10-30T23:09:01.845Z","repository":{"id":66059510,"uuid":"52203883","full_name":"rhysd/dot-github","owner":"rhysd","description":".github directory generator","archived":false,"fork":false,"pushed_at":"2020-05-23T15:37:55.000Z","size":48,"stargazers_count":251,"open_issues_count":1,"forks_count":73,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-02T12:17:06.422Z","etag":null,"topics":["github","golang","template","utility"],"latest_commit_sha":null,"homepage":null,"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/rhysd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-02-21T11:44:45.000Z","updated_at":"2025-03-22T11:11:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2ddc4a1-1ab6-4194-be00-fcbe0892f321","html_url":"https://github.com/rhysd/dot-github","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fdot-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fdot-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fdot-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fdot-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhysd","download_url":"https://codeload.github.com/rhysd/dot-github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248086158,"owners_count":21045286,"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":["github","golang","template","utility"],"created_at":"2024-08-01T19:00:38.401Z","updated_at":"2025-10-30T23:09:01.751Z","avatar_url":"https://github.com/rhysd.png","language":"Go","readme":"`.github` Directory Generator\n=============================\n\n| Linux and OS X                 | Windows                         | Coverage                         |\n| ------------------------------ | ------------------------------- | -------------------------------- |\n| [![Travis Badge][]][Travis CI] | [![Appveyor Badge][]][Appveyor] | [![Coverage Badge][]][Coveralls] |\n\nGitHub now supports [issue and pull request template](https://github.com/blog/2111-issue-and-pull-request-templates).\nThis repository provides `dot-github` command to generate the template files automatically for your\nGitHub repositories.  This also enables to manage template files in dotfiles for all of your machines.\n\n![screenshot](https://raw.githubusercontent.com/rhysd/ss/master/dot-github/main.gif)\n\n## Getting Started\n\n### 1. Installation\n\n`go get` command\n\n```sh\n$ go get github.com/rhysd/dot-github\n```\n\nor [released binaries](https://github.com/rhysd/dot-github/releases)\n\n```sh\ncd /path/to/Downloads  # Download binary for your platform\nchmod +x dot-github_your_platform\nmv dot-github_your_platform /usr/local/bin/dot-github\n```\n\n### 2. Write Your Template Files\n\n```sh\n$ mkdir -p ~/.github \u0026\u0026 cd ~/.github\n$ $EDITOR ISSUE_AND_PULL_REQUEST_TEMPLATE.md\n$ $EDITOR CONTRIBUTING.md\n```\n\nPlease read below instruction detail about template file\n\n**Note:** You can change the home directory for `dot-github` by `$DOT_GITHUB_HOME` environment variable.\n\n### 3. Generate `.github`\n\n```sh\n$ cd your-repo\n$ dot-github\n$ git add .github\n```\n\n### 4. Tweak Generated Files\n\nTweak generated files in `your-repo/.github/*` for your project-specific information.\n\n## Writing Template File\n\nYou can see [example directory in this repository](example/) for real world examples.\n\n`dot-github` looks below template files\n\n| File Path                                                     | Description                                                                               |\n| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |\n| `$DOT_GITHUB_HOME/.github/ISSUE_TEMPLATE.md`                  | Template for issues.                                                                      |\n| `$DOT_GITHUB_HOME/.github/PULL_REQUEST_TEMPLATE.md`           | Template for pull requests.                                                               |\n| `$DOT_GITHUB_HOME/.github/ISSUE_AND_PULL_REQUEST_TEMPLATE.md` | If above files are not found, this file is used for template of issues and pull requests. |\n| `$DOT_GITHUB_HOME/.github/CONTRIBUTING.md`                    | Template for contributing guideline.                                                      |\n\nNote that `$DOT_GITHUB_HOME` is an environment variable.  You can specify your favorite directory to put template files.  Default directory for it is `~`.\n\nAbove template files are parsed as [Golang's standard text template](https://golang.org/pkg/text/template/).  Below variables are available in template.  They are useful to write flexible and common template files for each repositories.\n\n| Variable Name     | Type      | Description                               |\n| ----------------- | --------- | ----------------------------------------- |\n| `.IsIssue`        | *boolean* | True when used for issue template.        |\n| `.IsPullRequest`  | *boolean* | True when used for pull request template. |\n| `.IsContributing` | *boolean* | True when used for contributing template. |\n| `.RepoName`       | *string*  | Repository name.                          |\n| `.RepoUser`       | *string*  | Repository owner name.                    |\n\n## Template Examples\n\n### Template files\n\n- `~/.github/ISSUE_AND_PULL_REQUEST_TEMPLATE.md`\n\n```\n{{if .IsIssue}}\n### Expected Behavior\n\n\n### Actual Behavior\n\n\n{{end}}\n{{if .IsPullRequest}}\n### Fix or Enhancement?\n\n\n- [ ] All tests passed\n{{end}}\n\n### Environment\n- OS: Write here\n- Go version: Write here\n```\n\n- `~/.github/CONTRIBUTING.md`\n\n```\nThank you for contributing {{.RepoName}}!\n=========================================\n\nPlease follow issue/PR template.\n```\n\n### Generated Files\n\n- `/path/to/your-repo/.github/ISSUE_TEMPLATE.md`\n\n```\n### Expected Behavior\n\n\n### Actual Behavior\n\n\n### Environment\n- OS: Write here\n- Go version: Write here\n```\n\n- `/path/to/your-repo/.github/PULL_REQUEST_TEMPLATE.md`\n\n```\n### Fix or Enhancement?\n\n\n- [ ] All tests passed\n\n### Environment\n- OS: Write here\n- Go version: Write here\n```\n\n- `/path/to/your-repo/.github/CONTRIBUTING.md`\n\n```\nThank you for contributing my-project!\n=========================================\n\nPlease follow issue/PR template.\n```\n\n## Update `dot-github` command\n\nTo update `dot-github` command, `-selfupdate` flag is recommended.\n\n## References\n\n- [Setting guidelines for repository contributors](https://help.github.com/articles/setting-guidelines-for-repository-contributors/)\n- [Creating an issue template for your repository](https://help.github.com/articles/creating-an-issue-template-for-your-repository/)\n- [Creating a pull request template for your repository](https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/)\n- [Issue と PR のテンプレートジェネレータつくった (Japanese Blog Post)](http://rhysd.hatenablog.com/entry/2016/02/21/233643)\n\n## License\n\nThis software is distributed under [MIT license](LICENSE.txt).\n\n\n[Travis Badge]: https://travis-ci.org/rhysd/dot-github.svg?branch=master\n[Travis CI]: https://travis-ci.org/rhysd/dot-github\n[Appveyor Badge]: https://ci.appveyor.com/api/projects/status/bjat5jyqmcgjfvwd?svg=true\n[Appveyor]: https://ci.appveyor.com/project/rhysd/dot-github\n[Coverage Badge]: https://coveralls.io/repos/github/rhysd/dot-github/badge.svg?branch=master\n[Coveralls]: https://coveralls.io/github/rhysd/dot-github?branch=master\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2Fdot-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhysd%2Fdot-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2Fdot-github/lists"}