diff --git a/.github/ubiquibot-config.yml b/.github/ubiquibot-config.yml new file mode 100644 index 00000000..6a9ea9a5 --- /dev/null +++ b/.github/ubiquibot-config.yml @@ -0,0 +1,8 @@ +payments: + basePriceMultiplier: 1.5 +features: + newContributorGreeting: + enabled: true + header: "Thank you for contributing to UbiquiBot! Please be sure to set your wallet address before completing your first task so that the automatic payout upon task completion will work for you." + displayHelpMenu: true + footer: "###### Also please star this repository and [@ubiquity/devpool-directory](https://github.com/ubiquity/devpool-directory/) to show your support. It helps a lot!" diff --git a/bun.lockb b/bun.lockb index 27c70cf0..7c4ef2fd 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index e40bcfa4..d8ec6e89 100644 --- a/package.json +++ b/package.json @@ -109,5 +109,5 @@ "ext": "ts", "exec": "bun start" }, - "packageManager": "bun@1.0.23" -} \ No newline at end of file + "packageManager": "bun@1.1.0" +} diff --git a/src/helpers/issue.ts b/src/helpers/issue.ts index 674a7c54..024a9d8b 100644 --- a/src/helpers/issue.ts +++ b/src/helpers/issue.ts @@ -163,15 +163,19 @@ export async function isUserAdminOrBillingManager( async function checkIfIsBillingManager() { if (!payload.organization) throw context.logger.fatal(`No organization found in payload!`); - const { data: membership } = await context.octokit.rest.orgs.getMembershipForUser({ - org: payload.organization.login, - username: payload.repository.owner.login, - }); - - console.trace(membership); - if (membership.role === "billing_manager") { - return true; - } else { + try { + const { data: membership } = await context.octokit.rest.orgs.getMembershipForUser({ + org: payload.organization.login, + username: payload.repository.owner.login, + }); + + console.trace(membership); + return membership.role === "billing_manager"; + } catch (e) { + context.logger.error( + `Could not get the Billing Manager status for ${payload.repository.owner.login} within ${payload.organization.login}`, + e + ); return false; } }