Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #929 from ubiquity/refactor/move-to-delegated-compute
Browse files Browse the repository at this point in the history
Merge Refactor/move to delegated compute into Development
  • Loading branch information
gentlementlegen authored Jun 7, 2024
2 parents d6b2083 + 86f94c4 commit 12b702d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .github/ubiquibot-config.yml
Original file line number Diff line number Diff line change
@@ -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!"
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@
"ext": "ts",
"exec": "bun start"
},
"packageManager": "bun@1.0.23"
}
"packageManager": "bun@1.1.0"
}
22 changes: 13 additions & 9 deletions src/helpers/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 12b702d

Please sign in to comment.