Merge pull request #638 from github/fix_crash_report_repo

[gh] Point crash report repo to github/hub
This commit is contained in:
Jingwen Owen Ou 2014-10-17 08:49:18 -07:00
Родитель 9694397a1d 81df5e3134
Коммит 2914ff1f29
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -14,9 +14,9 @@ import (
)
const (
ghReportCrashConfig = "gh.reportCrash"
ghProjectOwner = "jingweno"
ghProjectName = "gh"
hubReportCrashConfig = "hub.reportCrash"
hubProjectOwner = "github"
hubProjectName = "hub"
)
func CaptureCrash() {
@ -63,7 +63,7 @@ func report(reportedError error, stack string) {
title, body, err := reportTitleAndBody(reportedError, stack)
utils.Check(err)
project := NewProject(ghProjectOwner, ghProjectName, GitHubHost)
project := NewProject(hubProjectOwner, hubProjectName, GitHubHost)
gh := NewClient(project.Host)
@ -117,16 +117,16 @@ func printError(err error, stack string) {
func saveReportConfiguration(confirm string, always bool) {
if always {
git.SetGlobalConfig(ghReportCrashConfig, "always")
git.SetGlobalConfig(hubReportCrashConfig, "always")
} else if utils.IsOption(confirm, "e", "never") {
git.SetGlobalConfig(ghReportCrashConfig, "never")
git.SetGlobalConfig(hubReportCrashConfig, "never")
}
}
func reportCrashConfig() (opt string) {
opt = os.Getenv("GH_REPORT_CRASH")
if opt == "" {
opt, _ = git.GlobalConfig(ghReportCrashConfig)
opt, _ = git.GlobalConfig(hubReportCrashConfig)
}
return