Commit ce2a393b authored by Robert Knight's avatar Robert Knight

fixup! - Use a clearer name for `iterateItems` function

parent b0403d0c
......@@ -30,9 +30,10 @@ function getLastTag() {
}
/**
* Iterate over pages of items in a GitHub API response and yield each item.
* Iterate over items in a GitHub API response and yield each item, fetching
* additional pages of results as necessary.
*/
async function* iterateItems(octokit, response) {
async function* itemsInGitHubAPIResponse(octokit, response) {
let isFirstPage = true;
while (isFirstPage || octokit.hasNextPage(response)) {
isFirstPage = false;
......@@ -58,7 +59,7 @@ async function getPRsMergedSince(octokit, org, repo, tag) {
});
const prs = [];
for await (const pr of iterateItems(octokit, response)) {
for await (const pr of itemsInGitHubAPIResponse(octokit, response)) {
if (!pr.merged_at) {
// This PR was closed without being merged.
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment