Skip to content

Commit

Permalink
fix: support unlimited env quota in commons
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Oct 24, 2023
1 parent 1576f0a commit adfe006
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node-packages/commons/src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,9 @@ export const createDeployTask = async function(deployData: any) {
if (!environments.project.environments.map(e => e.name).find(i => i === branchName)) {
// check the environment quota, this prevents environments being deployed by the api or webhooks
const curOrg = await getOrganizationById(project.organization);
if (curOrg.environments.length >= curOrg.quotaEnvironment) {
if (curOrg.environments.length >= curOrg.quotaEnvironment && curOrg.quotaEnvironment != -1) {
throw new OrganizationEnvironmentLimit(
`'${branchName}' would exceed the organization environment quota of ${curOrg.quotaEnvironment}`
`'${branchName}' would exceed organization environment quota: ${curOrg.environments.length}/${curOrg.quotaEnvironment}`
);
}
}
Expand Down

0 comments on commit adfe006

Please sign in to comment.