Skip to content

Commit b597ee1

Browse files
committed
Variable naming changes
1 parent 8059f0d commit b597ee1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/merge-to-stage.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -151,26 +151,26 @@ const getStageToMainPR = () =>
151151
});
152152

153153
const openStageToMainPR = async () => {
154-
const { data } = await github.rest.repos.compareCommits({
154+
const { data: comparisonData } = await github.rest.repos.compareCommits({
155155
owner,
156156
repo,
157157
base: prod,
158158
head: stage,
159159
});
160160

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 } =
164164
await github.rest.repos.listPullRequestsAssociatedWithCommit({
165165
owner,
166166
repo,
167167
commit_sha: commit.sha,
168168
});
169169

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);
174174
}
175175
}
176176
}

0 commit comments

Comments
 (0)