1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-16 07:18:37 +00:00

fix wrong slack webhook payload URL

This commit is contained in:
Unknwon
2015-12-06 23:07:02 -05:00
parent abb02889f2
commit dce2a9e7e1
7 changed files with 16 additions and 7 deletions

View File

@@ -305,6 +305,10 @@ func (repo *Repository) RepoLink() string {
return setting.AppSubUrl + "/" + repo.MustOwner().Name + "/" + repo.Name
}
func (repo *Repository) FullRepoLink() string {
return setting.AppUrl + repo.MustOwner().Name + "/" + repo.Name
}
func (repo *Repository) HasAccess(u *User) bool {
has, _ := HasAccess(u, repo, ACCESS_MODE_READ)
return has
@@ -387,7 +391,7 @@ func (repo *Repository) ComposePayload() *api.PayloadRepo {
return &api.PayloadRepo{
ID: repo.ID,
Name: repo.LowerName,
URL: repo.RepoLink(),
URL: repo.FullRepoLink(),
SSHURL: cl.SSH,
CloneURL: cl.HTTPS,
Description: repo.Description,