Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
058f5a16
Unverified
Commit
058f5a16
authored
May 20, 2019
by
Torkel Ödegaard
Committed by
GitHub
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release: Improved cherry pick task (#17087)
* Release: Improved cherry pick task * Minor tweak to formatting
parent
0e210dc2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
scripts/cli/tasks/cherrypick.ts
+15
-5
No files found.
scripts/cli/tasks/cherrypick.ts
View file @
058f5a16
...
...
@@ -16,22 +16,32 @@ const cherryPickRunner: TaskRunner<CherryPickOptions> = async () => {
},
});
// sort by closed date
// sort by closed date
ASC
res
.
data
.
sort
(
function
(
a
,
b
)
{
return
new
Date
(
b
.
closed_at
).
getTime
()
-
new
Date
(
a
.
closed_at
).
getTime
();
return
new
Date
(
a
.
closed_at
).
getTime
()
-
new
Date
(
b
.
closed_at
).
getTime
();
});
let
commands
=
''
;
console
.
log
(
'--------------------------------------------------------------------'
);
console
.
log
(
'Printing PRs with cherry-pick-needed, in ASC merge date order'
);
console
.
log
(
'--------------------------------------------------------------------'
);
for
(
const
item
of
res
.
data
)
{
if
(
!
item
.
milestone
)
{
console
.
log
(
item
.
number
+
' missing milestone!'
);
continue
;
}
console
.
log
(
`
${
item
.
title
}
(
${
item
.
number
}
) closed_at
${
item
.
closed_at
}
`
);
console
.
log
(
`\tURL:
${
item
.
closed_at
}
${
item
.
html_url
}
`
);
const
issueDetails
=
await
client
.
get
(
item
.
pull_request
.
url
);
console
.
log
(
`\tMerge sha:
${
issueDetails
.
data
.
merge_commit_sha
}
`
);
console
.
log
(
`*
${
item
.
title
}
, (#
${
item
.
number
}
), merge-sha:
${
issueDetails
.
data
.
merge_commit_sha
}
`
);
commands
+=
`git cherry-pick -x
${
issueDetails
.
data
.
merge_commit_sha
}
\n`
;
}
console
.
log
(
'--------------------------------------------------------------------'
);
console
.
log
(
'Commands (in order of how they should be executed)'
);
console
.
log
(
'--------------------------------------------------------------------'
);
console
.
log
(
commands
);
};
export
const
cherryPickTask
=
new
Task
<
CherryPickOptions
>
();
...
...
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