File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,6 @@ use crate::core::application::file::Allocation;
27
27
28
28
pub mod application;
29
29
30
- const DEV_BOT_USER : & str = "filplus-github-bot-read-write[bot]" ;
31
- const PROD_BOT_USER : & str = "filplus-falcon[bot]" ;
32
-
33
30
#[ derive( Deserialize ) ]
34
31
pub struct CreateApplicationInfo {
35
32
pub issue_number : String ,
@@ -778,14 +775,7 @@ impl LDNApplication {
778
775
log:: info!( "- Application is in a valid state!" ) ;
779
776
return Ok ( true ) ;
780
777
}
781
-
782
- // Check if application is in any other state
783
- let bot_user = if get_env_var_or_default ( "FILPLUS_ENV" , "dev" ) == "prod" {
784
- PROD_BOT_USER
785
- } else {
786
- DEV_BOT_USER
787
- } ;
788
-
778
+ let bot_user = get_env_var_or_default ( "BOT_USER" , "filplus-github-bot-read-write[bot]" ) ;
789
779
if author != bot_user {
790
780
log:: warn!( "- Author is not the bot user" ) ;
791
781
return Ok ( false ) ;
@@ -813,11 +803,7 @@ impl LDNApplication {
813
803
let app_state = application_file. lifecycle . get_state ( ) ;
814
804
let active_request_id = application_file. lifecycle . active_request . clone ( ) ;
815
805
let valid_rkh = Self :: fetch_rkh ( ) . await ?;
816
- let bot_user = if get_env_var_or_default ( "FILPLUS_ENV" , "dev" ) == "prod" {
817
- PROD_BOT_USER
818
- } else {
819
- DEV_BOT_USER
820
- } ;
806
+ let bot_user = get_env_var_or_default ( "BOT_USER" , "filplus-github-bot-read-write[bot]" ) ;
821
807
822
808
let res: bool = match app_state {
823
809
AppState :: Submitted => {
You can’t perform that action at this time.
0 commit comments