Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
ce2a393b
Commit
ce2a393b
authored
Oct 17, 2018
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! - Use a clearer name for `iterateItems` function
parent
b0403d0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
generate-change-list.js
scripts/generate-change-list.js
+4
-3
No files found.
scripts/generate-change-list.js
View file @
ce2a393b
...
...
@@ -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
*
ite
rateItems
(
octokit
,
response
)
{
async
function
*
ite
msInGitHubAPIResponse
(
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
ite
rateItems
(
octokit
,
response
))
{
for
await
(
const
pr
of
ite
msInGitHubAPIResponse
(
octokit
,
response
))
{
if
(
!
pr
.
merged_at
)
{
// This PR was closed without being merged.
continue
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment