Skip to content

Commit

Permalink
Fix await inside non-async function
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Feb 28, 2024
1 parent 97dd8ad commit f322266
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,17 @@ jobs:
head: "${{ github.ref }}"
});
const pullRequests = commits.map((commit) => {
const pullRequests = [];
for (const commit of commits) {
const { data: response } = await octokit.request(`GET /repos/shopify/ruby-lsp/commits/${commit.sha}/pulls`);
{ title: response.title, url: response.html_url, labels: response.labels.map((label) => label.name) }
});
pullRequests.push({
title: response.title,
url: response.html_url,
labels: response.labels.map((label) => label.name)
});
}
const relevantPulls = pullRequests.filter((pull) => {
return pull.labels.some((label) => label === "vscode") &&
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@ jobs:
head: "${{ github.ref }}"
});
const pullRequests = commits.map((commit) => {
const pullRequests = [];
for (const commit of commits) {
const { data: response } = await octokit.request(`GET /repos/shopify/ruby-lsp/commits/${commit.sha}/pulls`);
{ title: response.title, url: response.html_url, labels: response.labels.map((label) => label.name) }
});
pullRequests.push({
title: response.title,
url: response.html_url,
labels: response.labels.map((label) => label.name)
});
}
const relevantPulls = pullRequests.filter((pull) => {
return pull.labels.some((label) => label === "server") &&
Expand Down

0 comments on commit f322266

Please sign in to comment.