@@ -36,6 +36,7 @@ interface ConfigurationData {
36
36
export class Configuration implements Omit < ConfigurationData , 'rootDirectory' > {
37
37
private _rootDirectory ! : ConfigurationData [ 'rootDirectory' ] ;
38
38
private readonly repoRoot : string ;
39
+ private _branch : string = 'develop' ;
39
40
40
41
public excludedDirectories : string [ ] = [ ] ;
41
42
public repository : Repository = {
@@ -49,7 +50,6 @@ export class Configuration implements Omit<ConfigurationData, 'rootDirectory'> {
49
50
public pullRequestLabels : string [ ] = [ 'documentation' , 'automated-pr' ] ;
50
51
public pullRequestReviewers : string [ ] = [ ] ;
51
52
public excludedFiles : string [ ] = [ "index.d.ts" ] ;
52
- public branch : string = 'develop' ;
53
53
54
54
constructor ( ) {
55
55
this . repoRoot = getRepoRoot ( ) ;
@@ -76,6 +76,14 @@ export class Configuration implements Omit<ConfigurationData, 'rootDirectory'> {
76
76
return path . resolve ( this . repoRoot , relativePath ) ;
77
77
}
78
78
79
+ get branch ( ) : string {
80
+ return this . _branch ;
81
+ }
82
+
83
+ set branch ( value : string ) {
84
+ this . _branch = value ;
85
+ }
86
+
79
87
private loadConfiguration ( ) : void {
80
88
// First try to get from environment variables
81
89
const rootDirectory = process . env . INPUT_ROOT_DIRECTORY ;
@@ -136,6 +144,9 @@ export class Configuration implements Omit<ConfigurationData, 'rootDirectory'> {
136
144
process . env . INPUT_REVIEWERS ,
137
145
[ ]
138
146
) ;
147
+
148
+ this . _branch = process . env . INPUT_BRANCH || 'develop' ;
149
+ console . log ( 'Using branch:' , this . _branch ) ;
139
150
}
140
151
141
152
private parseCommaSeparatedInput ( input : string | undefined , defaultValue : string [ ] ) : string [ ] {
0 commit comments