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 dingtalk webhook #2777

Merged
merged 7 commits into from
Nov 21, 2017
Merged

Add dingtalk webhook #2777

merged 7 commits into from
Nov 21, 2017

Conversation

lunny
Copy link
Member

@lunny lunny commented Oct 25, 2017

As title.

@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Oct 25, 2017
@lunny lunny added this to the 1.4.0 milestone Oct 25, 2017
Copy link
Member

@ethantkoenig ethantkoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests would be nice

// for each commit, generate attachment text
for i, commit := range p.Commits {
text += fmt.Sprintf("[%s](%s) %s - %s", commit.ID[:7], commit.URL,
strings.TrimRight(commit.Message, "\r\n"), commit.Author.Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit.Author may be nil (see #2771)

MsgType: "actionCard",
ActionCard: dingtalk.ActionCard{
Text: title,
Title: text,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should title and text be reversed?

case DING_TALK:
payloader, err = GetDingtalkPayload(p, event, w.Meta)
if err != nil {
return fmt.Errorf("GetDiscordPayload: %v", err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong error message


type (

// DingtalkPayload represents
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: represents what?

MsgType: "actionCard",
ActionCard: dingtalk.ActionCard{
Text: title,
Title: text,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should title and text be reversed?

@codecov-io
Copy link

codecov-io commented Oct 25, 2017

Codecov Report

Merging #2777 into master will decrease coverage by 0.24%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2777      +/-   ##
==========================================
- Coverage   27.23%   26.99%   -0.25%     
==========================================
  Files          89       90       +1     
  Lines       17648    17806     +158     
==========================================
  Hits         4806     4806              
- Misses      12154    12312     +158     
  Partials      688      688
Impacted Files Coverage Δ
models/webhook_dingtalk.go 0% <0%> (ø)
models/webhook.go 46.9% <0%> (-0.91%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 420fc8e...3238af9. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 25, 2017
@lunny
Copy link
Member Author

lunny commented Oct 25, 2017

@ethantkoenig done.

@lunny
Copy link
Member Author

lunny commented Nov 20, 2017

This is ready to review for v1.4

@lafriks
Copy link
Member

lafriks commented Nov 20, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 20, 2017
@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 21, 2017
@lafriks lafriks merged commit 10b54df into go-gitea:master Nov 21, 2017
@lunny lunny deleted the lunny/webhook_ding_talk branch November 21, 2017 05:33
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants