Skip to content

Commit

Permalink
chore(bot): fix git push
Browse files Browse the repository at this point in the history
  • Loading branch information
valpinkman committed Mar 28, 2024
1 parent 6f2b1e9 commit 215c348
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 98 deletions.
80 changes: 0 additions & 80 deletions tools/github-bot/src/commands/full-suite.ts

This file was deleted.

14 changes: 9 additions & 5 deletions tools/github-bot/src/commands/generate-screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ export function generateScreenshots(app: Probot) {
const number = payload.check_run.pull_requests[0]?.number;
const login = payload.sender.login;

const res = await context.octokit.orgs.checkMembershipForUser({
org: "LedgerHQ",
username: login,
});
try {
const res = await context.octokit.orgs.checkMembershipForUser({
org: "LedgerHQ",
username: login,
});

if (res.status >= 300) return;
if (res.status >= 300) return;
} catch (error) {
return;
}

if (!number) return;

Expand Down
14 changes: 9 additions & 5 deletions tools/github-bot/src/commands/regen-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ export function regenDoc(app: Probot) {
const number = payload.check_run.pull_requests[0]?.number;
const login = payload.sender.login;

const res = await context.octokit.orgs.checkMembershipForUser({
org: "LedgerHQ",
username: login,
});
try {
const res = await context.octokit.orgs.checkMembershipForUser({
org: "LedgerHQ",
username: login,
});

if (res.status >= 300) return;
if (res.status >= 300) return;
} catch (error) {
return;
}

if (!number) return;

Expand Down
14 changes: 9 additions & 5 deletions tools/github-bot/src/commands/regen-pods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ export function regenPods(app: Probot) {
const number = payload.check_run.pull_requests[0]?.number;
const login = payload.sender.login;

const res = await context.octokit.orgs.checkMembershipForUser({
org: "LedgerHQ",
username: login,
});
try {
const res = await context.octokit.orgs.checkMembershipForUser({
org: "LedgerHQ",
username: login,
});

if (res.status >= 300) return;
if (res.status >= 300) return;
} catch (error) {
return;
}

if (!number) return;

Expand Down
3 changes: 0 additions & 3 deletions tools/github-bot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { upToDate } from "./features/upToDate";
import { orchestrator } from "./features/orchestrator";
import { lintCommits } from "./features/lintCommits";
import { generateScreenshots } from "./commands/generate-screenshots";
import { runDesktopTestSuite } from "./commands/full-suite";
import { regenPods } from "./commands/regen-pods";
import { regenDoc } from "./commands/regen-doc";
import { autoClose } from "./features/autoClose";
Expand All @@ -17,8 +16,6 @@ export default (app: Probot) => {
regenPods(app);
// /regen-doc command
regenDoc(app);
// /full-lld-tests
runDesktopTestSuite(app);

/* PR stuff */

Expand Down

0 comments on commit 215c348

Please sign in to comment.