File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,20 @@ const getCommitDepth = () => {
2222 return Number . isNaN ( commitDepth ) ? null : Math . max ( commitDepth , 0 )
2323}
2424
25- const getPushEventCommits = ( ) => {
26- const mappedCommits = eventContext . payload . commits . map ( ( commit ) => ( {
27- message : commit . message ,
28- hash : commit . id ,
29- } ) )
25+ const getPushEventCommits = async ( ) => {
26+ const octokit = getOctokit ( getInput ( 'token' ) )
27+ const { owner, repo, before } = eventContext . issue
28+ const { data : commits } = await octokit . rest . repos . listCommits ( {
29+ owner,
30+ repo,
31+ sha : before ,
32+ per_page : 100 ,
33+ } )
3034
31- return mappedCommits
35+ return commits . map ( ( commit ) => ( {
36+ message : commit . commit . message ,
37+ hash : commit . sha ,
38+ } ) )
3239}
3340
3441const getPullRequestEventCommits = async ( ) => {
You can’t perform that action at this time.
0 commit comments