Mirror updates
This commit is contained in:
parent
b31070faf5
commit
f8cfb81fb0
|
@ -1,49 +1,29 @@
|
||||||
# Contributing to Gogs
|
# Contributing to Gogs
|
||||||
|
|
||||||
Want to hack on Gogs? Awesome! Here are instructions to get you
|
> Thanks [drone](https://github.com/drone/drone) because this guidelines sheet is forked from its [CONTRIBUTING.md](https://github.com/drone/drone/blob/master/CONTRIBUTING.md).
|
||||||
started. They are probably not perfect, please let us know if anything
|
|
||||||
feels wrong or incomplete.
|
Want to hack on Gogs? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete.
|
||||||
|
|
||||||
## Contribution guidelines
|
## Contribution guidelines
|
||||||
|
|
||||||
### Pull requests are always welcome
|
### Pull requests are always welcome
|
||||||
|
|
||||||
We are always thrilled to receive pull requests, and do our best to
|
We are always thrilled to receive pull requests, and do our best to process them as fast as possible. Not sure if that typo is worth a pull request? Do it! We will appreciate it.
|
||||||
process them as fast as possible. Not sure if that typo is worth a pull
|
|
||||||
request? Do it! We will appreciate it.
|
|
||||||
|
|
||||||
If your pull request is not accepted on the first try, don't be
|
If your pull request is not accepted on the first try, don't be discouraged! If there's a problem with the implementation, hopefully you received feedback on what to improve.
|
||||||
discouraged! If there's a problem with the implementation, hopefully you
|
|
||||||
received feedback on what to improve.
|
|
||||||
|
|
||||||
We're trying very hard to keep Gogs lean and focused. We don't want it
|
We're trying very hard to keep Gogs lean and focused. We don't want it to do everything for everybody. This means that we might decide against incorporating a new feature.
|
||||||
to do everything for everybody. This means that we might decide against
|
|
||||||
incorporating a new feature.
|
|
||||||
|
|
||||||
### Discuss your design on the mailing list
|
### Discuss your design on the mailing list
|
||||||
|
|
||||||
We recommend discussing your plans [on the mailing
|
We recommend discussing your plans [on the mailing list](https://groups.google.com/forum/#!forum/gogits) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
||||||
list](https://groups.google.com/forum/#!forum/gogits)
|
|
||||||
before starting to code - especially for more ambitious contributions.
|
|
||||||
This gives other contributors a chance to point you in the right
|
|
||||||
direction, give feedback on your design, and maybe point out if someone
|
|
||||||
else is working on the same thing.
|
|
||||||
|
|
||||||
We may close your pull request if not first discussed on the mailing
|
We may close your pull request if not first discussed on the mailing list. We aren't doing this to be jerks. We are doing this to prevent people from spending large amounts of time on changes that may need to be designed or architected in a specific way, or may not align with the vision of the project.
|
||||||
list. We aren't doing this to be jerks. We are doing this to prevent
|
|
||||||
people from spending large amounts of time on changes that may need
|
|
||||||
to be designed or architected in a specific way, or may not align with
|
|
||||||
the vision of the project.
|
|
||||||
|
|
||||||
### Create issues...
|
### Create issues...
|
||||||
|
|
||||||
Any significant improvement should be documented as [a GitHub
|
Any significant improvement should be documented as [a GitHub issue](https://github.com/gogits/gogs/issues) before anybody starts working on it.
|
||||||
issue](https://github.com/gogits/gogs/issues) before anybody
|
|
||||||
starts working on it.
|
|
||||||
|
|
||||||
### ...but check for existing issues first!
|
### ...but check for existing issues first!
|
||||||
|
|
||||||
Please take a moment to check that an issue doesn't already exist
|
Please take a moment to check that an issue doesn't already exist documenting your bug report or improvement proposal. If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests.
|
||||||
documenting your bug report or improvement proposal. If it does, it
|
|
||||||
never hurts to add a quick "+1" or "I have this problem too". This will
|
|
||||||
help prioritize the most common problems and requests.
|
|
|
@ -72,8 +72,11 @@ func (user *User) HomeLink() string {
|
||||||
|
|
||||||
// AvatarLink returns the user gravatar link.
|
// AvatarLink returns the user gravatar link.
|
||||||
func (user *User) AvatarLink() string {
|
func (user *User) AvatarLink() string {
|
||||||
|
if base.Service.EnableCacheAvatar {
|
||||||
return "/avatar/" + user.Avatar
|
return "/avatar/" + user.Avatar
|
||||||
}
|
}
|
||||||
|
return "http://1.gravatar.com/avatar/" + user.Avatar
|
||||||
|
}
|
||||||
|
|
||||||
// NewGitSig generates and returns the signature of given user.
|
// NewGitSig generates and returns the signature of given user.
|
||||||
func (user *User) NewGitSig() *git.Signature {
|
func (user *User) NewGitSig() *git.Signature {
|
||||||
|
|
|
@ -20,6 +20,10 @@ func Trace(format string, v ...interface{}) {
|
||||||
logger.Trace(format, v...)
|
logger.Trace(format, v...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Debug(format string, v ...interface{}) {
|
||||||
|
logger.Debug(format, v...)
|
||||||
|
}
|
||||||
|
|
||||||
func Info(format string, v ...interface{}) {
|
func Info(format string, v ...interface{}) {
|
||||||
logger.Info(format, v...)
|
logger.Info(format, v...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,10 @@ func Issues(ctx *middleware.Context, params martini.Params) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(params["branchname"]) == 0 {
|
||||||
|
params["branchname"] = "master"
|
||||||
|
}
|
||||||
|
ctx.Data["Branchname"] = params["branchname"]
|
||||||
ctx.HTML(200, "repo/issues")
|
ctx.HTML(200, "repo/issues")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,10 @@ func Branches(ctx *middleware.Context, params martini.Params) {
|
||||||
ctx.Data["Username"] = params["username"]
|
ctx.Data["Username"] = params["username"]
|
||||||
ctx.Data["Reponame"] = params["reponame"]
|
ctx.Data["Reponame"] = params["reponame"]
|
||||||
|
|
||||||
ctx.Data["Branchname"] = brs[0]
|
if len(params["branchname"]) == 0 {
|
||||||
|
params["branchname"] = "master"
|
||||||
|
}
|
||||||
|
ctx.Data["Branchname"] = params["branchname"]
|
||||||
ctx.Data["Branches"] = brs
|
ctx.Data["Branches"] = brs
|
||||||
ctx.Data["IsRepoToolbarBranches"] = true
|
ctx.Data["IsRepoToolbarBranches"] = true
|
||||||
|
|
||||||
|
@ -334,8 +337,13 @@ func Commits(ctx *middleware.Context, params martini.Params) {
|
||||||
ctx.HTML(200, "repo/commits")
|
ctx.HTML(200, "repo/commits")
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pulls(ctx *middleware.Context) {
|
func Pulls(ctx *middleware.Context, params martini.Params) {
|
||||||
ctx.Data["IsRepoToolbarPulls"] = true
|
ctx.Data["IsRepoToolbarPulls"] = true
|
||||||
|
if len(params["branchname"]) == 0 {
|
||||||
|
params["branchname"] = "master"
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.Data["Branchname"] = params["branchname"]
|
||||||
ctx.HTML(200, "repo/pulls")
|
ctx.HTML(200, "repo/pulls")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<!-- <div class="btn-group">
|
||||||
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Star"><i class="fa fa-star"></i> {{.Repository.NumStars}}</button>
|
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Star"><i class="fa fa-star"></i> {{.Repository.NumStars}}</button>
|
||||||
</div>
|
</div> -->
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a type="button" {{if not .IsRepositoryOwner}}href="/{{.Username}}/{{.Reponame}}/fork"{{end}} class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Fork"><i class="fa fa-code-fork fa-lg"></i> {{.Repository.NumForks}}</a>
|
<a type="button" {{if not .IsRepositoryOwner}}href="/{{.Username}}/{{.Reponame}}/fork"{{end}} class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Fork"><i class="fa fa-code-fork fa-lg"></i> {{.Repository.NumForks}}</a>
|
||||||
|
|
|
@ -6,27 +6,27 @@
|
||||||
<li class="{{if .IsRepoToolbarSource}}active{{end}}"><a href="/{{.RepositoryLink}}">Source</a></li>
|
<li class="{{if .IsRepoToolbarSource}}active{{end}}"><a href="/{{.RepositoryLink}}">Source</a></li>
|
||||||
{{if not .IsBareRepo}}
|
{{if not .IsBareRepo}}
|
||||||
<li class="{{if .IsRepoToolbarCommits}}active{{end}}"><a href="/{{.RepositoryLink}}/commits/{{.Branchname}}">Commits</a></li>
|
<li class="{{if .IsRepoToolbarCommits}}active{{end}}"><a href="/{{.RepositoryLink}}/commits/{{.Branchname}}">Commits</a></li>
|
||||||
<li class="{{if .IsRepoToolbarBranches}}active{{end}}"><a href="/{{.RepositoryLink}}/branches">Branches</a></li>
|
<!-- <li class="{{if .IsRepoToolbarBranches}}active{{end}}"><a href="/{{.RepositoryLink}}/branches">Branches</a></li> -->
|
||||||
<li class="{{if .IsRepoToolbarPulls}}active{{end}}"><a href="/{{.RepositoryLink}}/pulls">Pull Requests</a></li>
|
<!-- <li class="{{if .IsRepoToolbarPulls}}active{{end}}"><a href="/{{.RepositoryLink}}/pulls">Pull Requests</a></li> -->
|
||||||
<li class="{{if .IsRepoToolbarIssues}}active{{end}}"><a href="/{{.RepositoryLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li>
|
<li class="{{if .IsRepoToolbarIssues}}active{{end}}"><a href="/{{.RepositoryLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li>
|
||||||
<li class="dropdown">
|
<!-- <li class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="/{{.RepositoryLink}}/release">Release</a></li>
|
<li><a href="/{{.RepositoryLink}}/release">Release</a></li>
|
||||||
<li><a href="//{{.RepositoryLink}}/wiki">Wiki</a></li>
|
<li><a href="//{{.RepositoryLink}}/wiki">Wiki</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>{{end}}
|
</li> -->{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{{if not .IsBareRepo}}
|
{{if not .IsBareRepo}}
|
||||||
<li class="dropdown">
|
<!-- <li class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Statistic <b class="caret"></b></a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Statistic <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="#">Graphic</a></li>
|
<li><a href="#">Graphic</a></li>
|
||||||
<li><a href="#">Pulse</a></li>
|
<li><a href="#">Pulse</a></li>
|
||||||
<li><a href="#">Network</a></li>
|
<li><a href="#">Network</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>{{end}}{{if .IsRepositoryOwner}}
|
</li> -->{{end}}{{if .IsRepositoryOwner}}
|
||||||
<li class="{{if .IsRepoToolbarSetting}}active{{end}}"><a href="/{{.RepositoryLink}}/settings">Settings</a>
|
<li class="{{if .IsRepoToolbarSetting}}active{{end}}"><a href="/{{.RepositoryLink}}/settings">Settings</a>
|
||||||
</li>{{end}}
|
</li>{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<ul class="nav nav-pills pull-right">
|
<ul class="nav nav-pills pull-right">
|
||||||
<li class="active"><a href="/">Feed</a></li>
|
<li class="active"><a href="/">Feed</a></li>
|
||||||
<li><a href="/issues">Issues</a></li>
|
<li><a href="/issues">Issues</a></li>
|
||||||
<li><a href="/pulls">Pull Requests</a></li>
|
<!-- <li><a href="/pulls">Pull Requests</a></li>
|
||||||
<li><a href="/stars">Stars</a></li>
|
<li><a href="/stars">Stars</a></li> -->
|
||||||
</ul>
|
</ul>
|
||||||
<h3>News Feed</h3>
|
<h3>News Feed</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<ul class="nav nav-pills pull-right">
|
<ul class="nav nav-pills pull-right">
|
||||||
<li><a href="/">Feed</a></li>
|
<li><a href="/">Feed</a></li>
|
||||||
<li class="active"><a href="/issues">Issues</a></li>
|
<li class="active"><a href="/issues">Issues</a></li>
|
||||||
<li><a href="/pulls">Pull Requests</a></li>
|
<!-- <li><a href="/pulls">Pull Requests</a></li>
|
||||||
<li><a href="/stars">Stars</a></li>
|
<li><a href="/stars">Stars</a></li> -->
|
||||||
</ul>
|
</ul>
|
||||||
<h3>Issues</h3>
|
<h3>Issues</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item{{if .IsUserPageSetting}} list-group-item-success{{end}}"><a href="/user/setting">Account Profile</a></li>
|
<li class="list-group-item{{if .IsUserPageSetting}} list-group-item-success{{end}}"><a href="/user/setting">Account Profile</a></li>
|
||||||
<li class="list-group-item{{if .IsUserPageSettingPasswd}} list-group-item-success{{end}}"><a href="/user/setting/password">Password</a></li>
|
<li class="list-group-item{{if .IsUserPageSettingPasswd}} list-group-item-success{{end}}"><a href="/user/setting/password">Password</a></li>
|
||||||
<li class="list-group-item{{if .IsUserPageSettingNotify}} list-group-item-success{{end}}"><a href="/user/setting/notification">Notifications</a></li>
|
<!-- <li class="list-group-item{{if .IsUserPageSettingNotify}} list-group-item-success{{end}}"><a href="/user/setting/notification">Notifications</a></li> -->
|
||||||
<li class="list-group-item{{if .IsUserPageSettingSSH}} list-group-item-success{{end}}"><a href="/user/setting/ssh/">SSH Keys</a></li>
|
<li class="list-group-item{{if .IsUserPageSettingSSH}} list-group-item-success{{end}}"><a href="/user/setting/ssh/">SSH Keys</a></li>
|
||||||
<li class="list-group-item{{if .IsUserPageSettingSecurity}} list-group-item-success{{end}}"><a href="/user/setting/security">Security</a></li>
|
<!-- <li class="list-group-item{{if .IsUserPageSettingSecurity}} list-group-item-success{{end}}"><a href="/user/setting/security">Security</a></li> -->
|
||||||
<li class="list-group-item{{if .IsUserPageSettingDelete}} list-group-item-success{{end}}"><a href="/user/delete">Delete Account</a></li>
|
<li class="list-group-item{{if .IsUserPageSettingDelete}} list-group-item-success{{end}}"><a href="/user/delete">Delete Account</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue
Block a user