1
1
import { graphql } from '@octokit/graphql'
2
2
import shell from 'shelljs'
3
- import * as core from '@actions/core'
4
3
5
4
// Regexes to find the changelog contents within a PR.
6
5
const FIXES_REGEX = / ^ C H A N G E L O G - F I X E S : ( .* ) / gm
@@ -43,7 +42,7 @@ export async function generateChangelog(
43
42
for ( const release of releases ) {
44
43
// Only consider releases of the same type as the current channel.
45
44
if (
46
- release . name . startsWith ( channel ) &&
45
+ release . name . toLowerCase ( ) . startsWith ( channel ) &&
47
46
! release . version . startsWith (
48
47
currentVersion . substring ( 0 , currentVersion . length - 1 - 2 )
49
48
)
@@ -67,9 +66,7 @@ export async function generateChangelog(
67
66
`git --no-pager log ${ lastReleaseVersion } ...${ currentVersion } --pretty=format:%H` ,
68
67
{ silent : true }
69
68
)
70
- core . info ( `Executed git log with output ${ command } ` )
71
69
72
- core . info ( `Executed git log with output ${ command . stderr } ` )
73
70
const commits = command . stdout . trim ( ) . split ( '\n' )
74
71
const pullRequestMetadata = await fetchPullRequestBodyFromCommits (
75
72
commits ,
@@ -88,8 +85,6 @@ async function fetchPullRequestBodyFromCommits(
88
85
commits : string [ ] ,
89
86
graphqlWithAuth : Function
90
87
) : Promise < string [ ] > {
91
- core . info ( `generated commits ${ commits } ` )
92
-
93
88
let commitsSubQuery = ''
94
89
for ( const oid of commits ) {
95
90
commitsSubQuery += `
@@ -109,8 +104,6 @@ async function fetchPullRequestBodyFromCommits(
109
104
`
110
105
}
111
106
112
- core . info ( `Final subqery is ${ commitsSubQuery } ` )
113
-
114
107
const response = await graphqlWithAuth ( `
115
108
{
116
109
repository(owner: "warpdotdev", name: "warp-internal") {
@@ -119,8 +112,6 @@ async function fetchPullRequestBodyFromCommits(
119
112
}
120
113
` )
121
114
122
- core . info ( `response is ${ response } ` )
123
-
124
115
const commitsInfo : string [ ] = [ ]
125
116
for ( const oid of commits ) {
126
117
const commitResponse = response . repository [ `commit_${ oid } ` ]
0 commit comments