Skip to content

Commit a5d6702

Browse files
committed
chore: 📄 Switch to developer plan
1 parent 3bce793 commit a5d6702

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

‎src/plans.ts

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {Context, Probot} from "probot";
22
import {getRepoOwnerId, getRepoOwnerLogin, isOrgRepo} from "./context";
3-
import {showFreePlanWarning} from "./config";
43
import {addComment} from "./github";
54
import {Config} from "./entities/Config";
65
import {isRunningInGitHubActions, isRunningInTestEnvironment} from "./utils";
@@ -25,8 +24,8 @@ export async function hasValidSubscription(app: Probot, ctx: Context<any>, confi
2524
if (await isPaidPlan(app, ctx)) {
2625
return true;
2726
} else {
28-
await freePlanWarningComment(ctx, config);
29-
return true;
27+
await buyDeveloperPlanComment(ctx, config);
28+
return false;
3029
}
3130
}
3231

@@ -81,22 +80,19 @@ async function buyCommercialOrganizationPlanComment(ctx: Context<any>, config: C
8180
await addComment(ctx, config, buyComment)
8281
}
8382

84-
async function freePlanWarningComment(ctx: Context<any>, config: Config) {
85-
if (showFreePlanWarning(config)) {
86-
let freePlanWarning = '';
87-
freePlanWarning += 'Hi there :wave:\n\n';
88-
freePlanWarning += 'You are using the free plan of the Create Issue Branch App.\n';
89-
freePlanWarning += 'Due to its popularity, offering the App for free is becoming too costly for me.\n';
90-
freePlanWarning += 'The free plan is therefore going to be deprecated on March 1st, 2025.\n\n';
91-
freePlanWarning += 'If you want to continue using this App, please upgrade to the Developer plan.\n';
92-
freePlanWarning += 'The Developer plan costs only $1 per month (or $10 yearly).\nYou can upgrade on the ';
93-
freePlanWarning += '[GitHub Marketplace](https://github.com/marketplace/create-issue-branch)\n\n';
94-
freePlanWarning += 'If you have any questions reach out to me by ';
95-
freePlanWarning += '[opening an issue](https://github.com/robvanderleek/create-issue-branch/issues).\n';
96-
freePlanWarning += 'To disable this message, insert `freePlanWarning: false` in your configuration YAML.\n';
97-
config.silent = false;
98-
await addComment(ctx, config, freePlanWarning);
99-
}
83+
async function buyDeveloperPlanComment(ctx: Context<any>, config: Config) {
84+
let buyComment = '';
85+
buyComment += 'Hi there :wave:\n\n';
86+
buyComment += 'You are using the free plan of the Create Issue Branch App.\n';
87+
buyComment += 'Due to its popularity, offering the App for free is becoming too costly for me.\n';
88+
buyComment += 'The free plan was therefore deprecated on March 1st, 2025.\n\n';
89+
buyComment += 'If you want to continue using this App, please upgrade to the Developer plan.\n';
90+
buyComment += 'The Developer plan costs only $1 per month (or $10 yearly).\nYou can upgrade on the ';
91+
buyComment += '[GitHub Marketplace](https://github.com/marketplace/create-issue-branch)\n\n';
92+
buyComment += 'If you have any questions reach out to me by ';
93+
buyComment += '[opening an issue](https://github.com/robvanderleek/create-issue-branch/issues).\n';
94+
config.silent = false;
95+
await addComment(ctx, config, buyComment);
10096
}
10197

10298
export function isFreePaidSubscription(app: Probot, ctx: Context<any>): boolean {

0 commit comments

Comments
 (0)