Commit b597ee1 1 parent 8059f0d commit b597ee1 Copy full SHA for b597ee1
File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -151,26 +151,26 @@ const getStageToMainPR = () =>
151
151
} ) ;
152
152
153
153
const openStageToMainPR = async ( ) => {
154
- const { data } = await github . rest . repos . compareCommits ( {
154
+ const { data : comparisonData } = await github . rest . repos . compareCommits ( {
155
155
owner,
156
156
repo,
157
157
base : prod ,
158
158
head : stage ,
159
159
} ) ;
160
160
161
- const prSet = new Set ( ) ;
162
- for ( const commit of data . commits ) {
163
- const { data } =
161
+ const seenPRs = new Set ( ) ;
162
+ for ( const commit of comparisonData . commits ) {
163
+ const { data : pullRequestData } =
164
164
await github . rest . repos . listPullRequestsAssociatedWithCommit ( {
165
165
owner,
166
166
repo,
167
167
commit_sha : commit . sha ,
168
168
} ) ;
169
169
170
- for ( const { title , html_url } of data ) {
171
- if ( ! prSet . has ( html_url ) ) {
172
- body = `- [${ title } ](${ html_url } )\n${ body } ` ;
173
- prSet . add ( html_url ) ;
170
+ for ( const pr of pullRequestData ) {
171
+ if ( ! seenPRs . has ( pr . html_url ) ) {
172
+ body = `- [${ pr . title } ](${ pr . html_url } )\n${ body } ` ;
173
+ seenPRs . add ( pr . html_url ) ;
174
174
}
175
175
}
176
176
}
You can’t perform that action at this time.
0 commit comments