File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const TARGET_EVENTS = [
1414 "MemberEvent" ,
1515 "PublicEvent" ,
1616 "PullRequestEvent" ,
17+ "ReleaseEvent" ,
1718 "WatchEvent"
1819] as const ;
1920const FILTERED_ACTIONS = [
@@ -25,6 +26,7 @@ function getActionString({ type, payload }: RawEvent): string {
2526 switch ( type ) {
2627 case "ForkEvent" : return "forked" ;
2728 case "IssuesEvent" : return `${ payload . action } issue` ;
29+ case "ReleaseEvent" : return `${ payload . action } release` ;
2830 case "MemberEvent" : return "joined" ;
2931 case "PublicEvent" : return "made public" ;
3032 case "PullRequestEvent" : return `${ payload . action } pull request` ;
@@ -47,6 +49,10 @@ function composeEventUrl(event: RawEvent): string | null {
4749 const html_url = `https://github.com/${ event . repo . name } /pull/${ number } ` ;
4850 return `<a href="${ html_url } " rel="noopener noreferrer" title="Go to pull request">#${ number } </a> in ` ;
4951 }
52+ if ( event . type === "ReleaseEvent" && "release" in event . payload ) {
53+ const { html_url, name } = event . payload . release as { html_url : string , name : string } ;
54+ return `<a href="${ html_url } " rel="noopener noreferrer" title="Go to release">${ name } </a> in ` ;
55+ }
5056 return null ;
5157}
5258
You can’t perform that action at this time.
0 commit comments