Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
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
Alex
next.js
Commits
b6a45eba
Unverified
Commit
b6a45eba
authored
Jun 05, 2024
by
Sebastian Silbermann
Committed by
GitHub
Jun 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sync-react changelog (#66532)
parent
3445a562
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
sync-react.js
scripts/sync-react.js
+2
-5
No files found.
scripts/sync-react.js
View file @
b6a45eba
...
@@ -204,7 +204,7 @@ function extractInfoFromReactVersion(reactVersion) {
...
@@ -204,7 +204,7 @@ function extractInfoFromReactVersion(reactVersion) {
async
function
getChangelogFromGitHub
(
baseSha
,
newSha
)
{
async
function
getChangelogFromGitHub
(
baseSha
,
newSha
)
{
const
pageSize
=
50
const
pageSize
=
50
let
changelog
=
[]
let
changelog
=
[]
for
(
let
currentPage
=
0
;
;
currentPage
++
)
{
for
(
let
currentPage
=
1
;
;
currentPage
++
)
{
const
url
=
`https://api.github.com/repos/facebook/react/compare/
${
baseSha
}
...
${
newSha
}
?per_page=
${
pageSize
}
&page=
${
currentPage
}
`
const
url
=
`https://api.github.com/repos/facebook/react/compare/
${
baseSha
}
...
${
newSha
}
?per_page=
${
pageSize
}
&page=
${
currentPage
}
`
const
headers
=
{}
const
headers
=
{}
// GITHUB_TOKEN is optional but helps in case of rate limiting during development.
// GITHUB_TOKEN is optional but helps in case of rate limiting during development.
...
@@ -221,10 +221,7 @@ async function getChangelogFromGitHub(baseSha, newSha) {
...
@@ -221,10 +221,7 @@ async function getChangelogFromGitHub(baseSha, newSha) {
}
}
const
data
=
await
response
.
json
()
const
data
=
await
response
.
json
()
const
{
base_commit
,
commits
}
=
data
const
{
commits
}
=
data
if
(
currentPage
===
0
)
{
commits
.
unshift
(
base_commit
)
}
for
(
const
{
commit
,
sha
}
of
commits
)
{
for
(
const
{
commit
,
sha
}
of
commits
)
{
const
title
=
commit
.
message
.
split
(
'
\
n'
)[
0
]
||
''
const
title
=
commit
.
message
.
split
(
'
\
n'
)[
0
]
||
''
const
match
=
const
match
=
...
...
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