mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
fix wrong slack webhook payload URL
This commit is contained in:
parent
abb02889f2
commit
dce2a9e7e1
7 changed files with 16 additions and 7 deletions
|
@ -479,7 +479,7 @@ func CommitRepoAction(
|
|||
commits[i] = &api.PayloadCommit{
|
||||
ID: cmt.Sha1,
|
||||
Message: cmt.Message,
|
||||
URL: fmt.Sprintf("%s/commit/%s", repo.RepoLink(), cmt.Sha1),
|
||||
URL: fmt.Sprintf("%s/commit/%s", repo.FullRepoLink(), cmt.Sha1),
|
||||
Author: &api.PayloadAuthor{
|
||||
Name: cmt.AuthorName,
|
||||
Email: cmt.AuthorEmail,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue