FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sentry-javascript/scripts/get-commit-list.ts at develop · getsentry/sentry-javascript · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
getsentry
/
sentry-javascript
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
1.8k
Star
8.7k
Code
Issues
544
Pull requests
67
Discussions
Actions
Security and quality
5
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
sentry-javascript
/
scripts
/
get-commit-list.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
40 lines (31 loc) · 1.06 KB
Breadcrumbs
sentry-javascript
/
scripts
/
get-commit-list.ts
Copy path
File metadata and controls
40 lines (31 loc) · 1.06 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import
{
execSync
}
from
'child_process'
;
const
ISSUE_URL
=
'https://github.com/getsentry/sentry-javascript/pull/'
;
export
function
getNewGitCommits
(
)
:
string
[
]
{
const
commits
=
execSync
(
'git log --format="- %s"'
)
.
toString
(
)
.
split
(
'\n'
)
;
const
lastReleasePos
=
commits
.
findIndex
(
commit
=>
/
-
m
e
t
a
\(
c
h
a
n
g
e
l
o
g
\)
/
i
.
test
(
commit
)
)
;
const
newCommits
=
commits
.
splice
(
0
,
lastReleasePos
)
.
filter
(
commit
=>
{
// Filter out merge commits
if
(
/
M
e
r
g
e
p
u
l
l
r
e
q
u
e
s
t
/
.
test
(
commit
)
)
{
return
false
;
}
// Filter release branch merged
if
(
/
M
e
r
g
e
b
r
a
n
c
h
/
.
test
(
commit
)
)
{
return
false
;
}
// Filter release commit itself
if
(
/
r
e
l
e
a
s
e
:
/
.
test
(
commit
)
)
{
return
false
;
}
return
true
;
}
)
;
newCommits
.
sort
(
(
a
,
b
)
=>
a
.
localeCompare
(
b
)
)
;
return
newCommits
.
map
(
commit
=>
commit
.
replace
(
/
#
(
\d
+
)
/
,
`[#$1](
${
ISSUE_URL
}
$1)`
)
)
;
}
function
run
(
)
:
void
{
// eslint-disable-next-line no-console
console
.
log
(
getNewGitCommits
(
)
.
join
(
'\n'
)
)
;
}
// Only run when executed directly, not when imported
if
(
require
.
main
===
module
)
{
run
(
)
;
}
Back
|
FazBrowse Home
|
New Git URL