зеркало из https://github.com/electron/trop.git
fix: add missing 'await' prefix when calling async (#206)
This commit is contained in:
Родитель
77a9c288e0
Коммит
199fcaa1dc
|
@ -491,7 +491,7 @@ const probotHandler = async (robot: Application) => {
|
|||
if (!cmd.startsWith(TROP_COMMAND_PREFIX)) return;
|
||||
|
||||
// Allow all users with push access to handle backports.
|
||||
if (!isAuthorizedUser(context, comment.user.login)) {
|
||||
if (!(await isAuthorizedUser(context, comment.user.login))) {
|
||||
robot.log(
|
||||
`@${comment.user.login} is not authorized to run PR backports - stopping`,
|
||||
);
|
||||
|
|
|
@ -56,7 +56,7 @@ export const labelClosedPR = async (
|
|||
|
||||
if (change === PRChange.CLOSE) {
|
||||
const targetLabel = PRStatus.TARGET + targetBranch;
|
||||
if (labelUtils.labelExistsOnPR(context, pr.number, targetLabel)) {
|
||||
if (await labelUtils.labelExistsOnPR(context, pr.number, targetLabel)) {
|
||||
await labelUtils.removeLabel(context, pr.number, targetLabel);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче