Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feishu webhook support #10229

Merged
merged 3 commits into from
Feb 12, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint
  • Loading branch information
lunny committed Feb 12, 2020
commit a21643e377d690bcfb3f2a05327c438c1fc8f83a
12 changes: 0 additions & 12 deletions modules/webhook/feishu.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,6 @@ func getFeishuPushPayload(p *api.PushPayload) (*FeishuPayload, error) {
commitDesc string
)

var titleLink string
if len(p.Commits) == 1 {
commitDesc = "1 new commit"
titleLink = p.Commits[0].URL
} else {
commitDesc = fmt.Sprintf("%d new commits", len(p.Commits))
titleLink = p.CompareURL
}
if titleLink == "" {
titleLink = p.Repo.HTMLURL + "/src/" + branchName
}

title := fmt.Sprintf("[%s:%s] %s", p.Repo.FullName, branchName, commitDesc)

var text string
Expand Down