1
1
import { Context , Probot } from "probot" ;
2
2
import { getRepoOwnerId , getRepoOwnerLogin , isOrgRepo } from "./context" ;
3
- import { showFreePlanWarning } from "./config" ;
4
3
import { addComment } from "./github" ;
5
4
import { Config } from "./entities/Config" ;
6
5
import { isRunningInGitHubActions , isRunningInTestEnvironment } from "./utils" ;
@@ -25,8 +24,8 @@ export async function hasValidSubscription(app: Probot, ctx: Context<any>, confi
25
24
if ( await isPaidPlan ( app , ctx ) ) {
26
25
return true ;
27
26
} else {
28
- await freePlanWarningComment ( ctx , config ) ;
29
- return true ;
27
+ await buyDeveloperPlanComment ( ctx , config ) ;
28
+ return false ;
30
29
}
31
30
}
32
31
@@ -81,22 +80,19 @@ async function buyCommercialOrganizationPlanComment(ctx: Context<any>, config: C
81
80
await addComment ( ctx , config , buyComment )
82
81
}
83
82
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 ) ;
100
96
}
101
97
102
98
export function isFreePaidSubscription ( app : Probot , ctx : Context < any > ) : boolean {
0 commit comments