зеркало из https://github.com/electron/trop.git
chore: add metric log
This commit is contained in:
Родитель
e91c5017b0
Коммит
fa08227815
|
@ -5,4 +5,5 @@ working
|
|||
*.pem
|
||||
package-lock.json
|
||||
yarn-error.log
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
.envrc
|
||||
|
|
15
src/utils.ts
15
src/utils.ts
|
@ -116,7 +116,8 @@ const tryBackportAllCommits = async (opts: TryBackportOptions) => {
|
|||
await context.octokit.issues.createComment(
|
||||
context.repo({
|
||||
issue_number: opts.pr.number,
|
||||
body: 'This PR has exceeded the automatic backport commit limit \
|
||||
body:
|
||||
'This PR has exceeded the automatic backport commit limit \
|
||||
and must be performed manually.',
|
||||
}),
|
||||
);
|
||||
|
@ -356,8 +357,9 @@ const checkUserHasWriteAccess = async (
|
|||
);
|
||||
|
||||
const params = context.repo({ username: user });
|
||||
const { data: userInfo } =
|
||||
await context.octokit.repos.getCollaboratorPermissionLevel(params);
|
||||
const {
|
||||
data: userInfo,
|
||||
} = await context.octokit.repos.getCollaboratorPermissionLevel(params);
|
||||
|
||||
// Possible values for the permission key: 'admin', 'write', 'read', 'none'.
|
||||
// In order for the user's review to count, they must be at least 'write'.
|
||||
|
@ -522,6 +524,13 @@ export const backportImpl = async (
|
|||
end();
|
||||
}
|
||||
|
||||
console.log({
|
||||
msg: 'backport-result',
|
||||
pullRequest: pr.number,
|
||||
backportPurpose: purpose,
|
||||
success,
|
||||
});
|
||||
|
||||
// Throw if neither succeeded - if we don't we
|
||||
// never enter the ErrorExecutor and the check hangs.
|
||||
if (!success) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче