Merge pull request #1482 from ldez/docs/github-template

doc: enhance GitHub template.
This commit is contained in:
Ludovic Fernandez 2017-04-25 12:10:10 +02:00 committed by GitHub
commit 34b21b9374
7 changed files with 141 additions and 36 deletions

View file

@ -33,7 +33,7 @@ traefik*
- You need `go` v1.7+
- It is recommended you clone Træfik into a directory like `~/go/src/github.com/containous/traefik` (This is the official golang workspace hierarchy, and will allow dependencies to resolve properly)
- This will allow your `GOPATH` and `PATH` variable to be set to `~/go` via:
```
```bash
$ export GOPATH=~/go
$ export PATH=$PATH:$GOPATH/bin
```
@ -95,7 +95,7 @@ Test success
```
For development purposes, you can specify which tests to run by using:
```
```bash
# Run every tests in the MyTest suite
TESTFLAGS="-check.f MyTestSuite" make test-integration
@ -124,7 +124,7 @@ The [documentation site](http://docs.traefik.io/) is built with [mkdocs](http://
First make sure you have python and pip installed
```
```shell
$ python --version
Python 2.7.2
$ pip --version
@ -133,13 +133,13 @@ pip 1.5.2
Then install mkdocs with pip
```
```shell
$ pip install mkdocs
```
To test documentation locally run `mkdocs serve` in the root directory, this should start a server locally to preview your changes.
```
```shell
$ mkdocs serve
INFO - Building documentation...
WARNING - Config value: 'theme'. Warning: The theme 'united' will be removed in an upcoming MkDocs release. See http://www.mkdocs.org/about/release-notes/ for more details

View file

@ -1,16 +0,0 @@
### What version of Traefik are you using (`traefik version`)?
### What is your environment & configuration (arguments, toml...)?
### What did you do?
### What did you expect to see?
### What did you see instead?
### If applicable, please paste the log output in debug mode (`--debug` switch)

45
.github/ISSUE_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,45 @@
<!--
How to write a good issue?
Read https://github.com/containous/traefik/blob/master/.github/how-to-write-a-good-issue.md
And the contributing guide: https://github.com/containous/traefik/blob/master/.github/CONTRIBUTING.md
-->
### Do you want to request a *feature* or report a *bug*?
### What did you do?
### What did you expect to see?
### What did you see instead?
### Output of `traefik version`: (_What version of Traefik are you using?_)
```
(paste your output here)
```
### What is your environment & configuration (arguments, toml, provider, platform, ...)?
```toml
# (paste your configuration here)
```
<!--
Add more configuration information here.
-->
### If applicable, please paste the log output in debug mode (`--debug` switch)
```
(paste your output here)
```

13
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,13 @@
<!--
How to write a good pull request?
Read https://github.com/containous/traefik/blob/master/.github/how-to-write-a-good-pull-request.md.
And the contributing guide: https://github.com/containous/traefik/blob/master/.github/CONTRIBUTING.md.
-->
### Description
<!--
Briefly describe the pull request in a few paragraphs.
-->

25
.github/how-to-write-a-good-issue.md vendored Normal file
View file

@ -0,0 +1,25 @@
# How to write a good issue
Please keep in mind that the GitHub issue tracker is not intended as a general support forum, but for reporting bugs and feature requests.
For other type of questions, consider using one of:
- the [Traefik community Slack channel](https://traefik.herokuapp.com)
- [StackOverflow](https://stackoverflow.com/questions/tagged/traefik)
## Title
The title must be short and descriptive.
## Description of the issue
- Explain the conditions which led you to write this issue: the context.
- The context should lead to something, an idea or a problem that youre facing.
- Remain clear and concise.
## Format your messages
Help the reader focus on what matters and understand the structure of your message.
[GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown) has a simple but effective syntax: make use of bold text, lists, check-boxes, syntax highlighting, headers, lists, links and images.

View file

@ -0,0 +1,13 @@
# How to write a good pull request
- Make it small
- Do only one thing
- Avoid re-formatting
- Make sure the code builds
- Make sure all tests pass
- Add tests
- Write useful descriptions and titles
- Address review comments in terms of additional commits.
- Do not amend/squash existing ones unless the PR is trivial.
Read [10 tips for better pull requests](http://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/).

View file

@ -16,26 +16,51 @@ import (
var (
bugtracker = "https://github.com/containous/traefik/issues/new"
bugTemplate = `### What version of Traefik are you using?
` + "```" + `
{{.Version}}
` + "```" + `
bugTemplate = `<!--
How to write a good issue?
Read https://github.com/containous/traefik/blob/master/.github/how-to-write-a-good-issue.md
And the contributing guide: https://github.com/containous/traefik/blob/master/.github/CONTRIBUTING.md
-->
### Do you want to request a *feature* or report a *bug*?
### What is your environment & configuration (arguments, toml...)?
` + "```" + `
{{.Configuration}}
` + "```" + `
### What did you do?
### What did you expect to see?
### What did you see instead?
### If applicable, please paste the log output in debug mode ('--debug' switch)
### Output of ` + "`" + `traefik version` + "`" + `: (_What version of Traefik are you using?_)
` + "```" + `
{{.Version}}
` + "```" + `
### What is your environment & configuration (arguments, toml, provider, platform, ...)?
` + "```" + `toml
{{.Configuration}}
` + "```" + `
<!--
Add more configuration information here.
-->
### If applicable, please paste the log output in debug mode (` + "`" + `--debug` + "`" + ` switch)
` + "```" + `
(paste your output here)
` + "```" + `
`
)
@ -78,8 +103,8 @@ func newBugCmd(traefikConfiguration interface{}, traefikPointersConfiguration in
}
body := bug.String()
url := bugtracker + "?body=" + url.QueryEscape(body)
if err := openBrowser(url); err != nil {
URL := bugtracker + "?body=" + url.QueryEscape(body)
if err := openBrowser(URL); err != nil {
fmt.Print("Please file a new issue at " + bugtracker + " using this template:\n\n")
fmt.Print(body)
}
@ -92,15 +117,15 @@ func newBugCmd(traefikConfiguration interface{}, traefikPointersConfiguration in
}
}
func openBrowser(url string) error {
func openBrowser(URL string) error {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
err = exec.Command("xdg-open", URL).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", URL).Start()
case "darwin":
err = exec.Command("open", url).Start()
err = exec.Command("open", URL).Start()
default:
err = fmt.Errorf("unsupported platform")
}