-
Notifications
You must be signed in to change notification settings - Fork 152
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
[MM-352] Add feature to publish release create and delete events #762
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2e1faf0
[MM-352] Add feature to publish release create and delete events
ayusht2810 7a389b3
[MM-352] Update readme for updated webhook events
ayusht2810 22b4e6d
[MM-352] Update logic of creating post for the release events
ayusht2810 b571359
[MM-352] Update indentation in template
ayusht2810 28fab41
[MM-352] Add release event in command help text
ayusht2810 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,6 +158,11 @@ func init() { | |
`[#{{.GetNumber}} {{.GetTitle}}]({{.GetHTMLURL}})`, | ||
)) | ||
|
||
// The release links to the corresponding release. | ||
template.Must(masterTemplate.New("release").Parse( | ||
`[{{.GetTagName}}]({{.GetHTMLURL}})`, | ||
)) | ||
|
||
// The eventRepoIssue links to the corresponding issue. Note that, for some events, the | ||
// issue *is* a pull request, and so we still use .GetIssue and this template accordingly. | ||
template.Must(masterTemplate.New("eventRepoIssue").Parse( | ||
|
@@ -408,6 +413,7 @@ Assignees: {{range $i, $el := .Assignees -}} {{- if $i}}, {{end}}{{template "use | |
" * `issue_comments` - includes new issue comments\n" + | ||
" * `issue_creations` - includes new issues only \n" + | ||
" * `pull_reviews` - includes pull request reviews\n" + | ||
" * `releases` - includes release created and deleted\n" + | ||
" * `label:<labelname>` - limit pull request and issue events to only this label. Must include `pulls` or `issues` in feature list when using a label.\n" + | ||
" * Defaults to `pulls,issues,creates,deletes`\n\n" + | ||
" * `--exclude-org-member` - events triggered by organization members will not be delivered (the GitHub organization config should be set, otherwise this flag has not effect)\n" + | ||
|
@@ -429,6 +435,12 @@ Assignees: {{range $i, $el := .Assignees -}} {{- if $i}}, {{end}}{{template "use | |
{{- else }} unstarred | ||
{{- end }} by {{template "user" .GetSender}} | ||
It now has **{{.GetRepo.GetStargazersCount}}** stars.`)) | ||
|
||
template.Must(masterTemplate.New("newReleaseEvent").Funcs(funcMap).Parse(` | ||
{{template "repo" .GetRepo}} {{template "user" .GetSender}} | ||
{{- if eq .GetAction "created" }} created a release {{template "release" .GetRelease}} | ||
{{- else if eq .GetAction "deleted" }} deleted a release {{template "release" .GetRelease}} | ||
Comment on lines
+441
to
+442
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there any other actions besides these two? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes the other events are:
|
||
{{- end -}}`)) | ||
} | ||
|
||
func registerGitHubToUsernameMappingCallback(callback func(string) string) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog should mention that GH admins need to update their hooks.
@ayusht2810 Do you have a suggestion where we could store that notice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanzei We can manually update release notes to have that changelog or create a separate PR for this change to have a changelog for it. What is your opinion on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release notes are essentially the changelog for plugin releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have
Branch or Tag creation
already. Isn't that about the same as releases? I'm actually not sure if that tag creation feature works properly