Skip to content

Commit 1e641af

Browse files
authored
Merge branch 'develop' into fix--Telegram-Markdown-issues
2 parents d5ffcae + 74e4ef2 commit 1e641af

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

.github/workflows/jsdoc-automation.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
required: true
2323
default: ''
2424
type: string
25+
branch:
26+
description: 'Target branch for PR (defaults to develop)'
27+
required: false
28+
default: 'develop'
29+
type: string
2530

2631
jobs:
2732
generate-docs:
@@ -49,7 +54,7 @@ jobs:
4954
run_install: false
5055

5156
- name: Update lockfile
52-
working-directory: packages/jsdoc-automation
57+
working-directory: scripts/jsdoc-automation
5358
run: |
5459
echo "Updating lockfile..."
5560
pnpm install --no-frozen-lockfile
@@ -63,11 +68,11 @@ jobs:
6368
run: pnpm install --no-frozen-lockfile
6469

6570
- name: Install package dependencies
66-
working-directory: packages/jsdoc-automation
71+
working-directory: scripts/jsdoc-automation
6772
run: pnpm install --no-frozen-lockfile
6873

6974
- name: Run documentation generator
70-
working-directory: packages/jsdoc-automation
75+
working-directory: scripts/jsdoc-automation
7176
run: |
7277
echo "Node version: $(node --version)"
7378
echo "NPM version: $(npm --version)"
@@ -78,4 +83,5 @@ jobs:
7883
INPUT_ROOT_DIRECTORY: ${{ inputs.root_directory }}
7984
INPUT_PULL_NUMBER: ${{ inputs.pull_number }}
8085
INPUT_EXCLUDED_DIRECTORIES: ${{ inputs.excluded_directories }}
81-
INPUT_REVIEWERS: ${{ inputs.reviewers }}
86+
INPUT_REVIEWERS: ${{ inputs.reviewers }}
87+
INPUT_BRANCH: ${{ inputs.branch }}

scripts/jsdoc-automation/src/Configuration.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ interface ConfigurationData {
3636
export class Configuration implements Omit<ConfigurationData, 'rootDirectory'> {
3737
private _rootDirectory!: ConfigurationData['rootDirectory'];
3838
private readonly repoRoot: string;
39+
private _branch: string = 'develop';
3940

4041
public excludedDirectories: string[] = [];
4142
public repository: Repository = {
@@ -49,7 +50,6 @@ export class Configuration implements Omit<ConfigurationData, 'rootDirectory'> {
4950
public pullRequestLabels: string[] = ['documentation', 'automated-pr'];
5051
public pullRequestReviewers: string[] = [];
5152
public excludedFiles: string[] = ["index.d.ts"];
52-
public branch: string = 'develop';
5353

5454
constructor() {
5555
this.repoRoot = getRepoRoot();
@@ -76,6 +76,14 @@ export class Configuration implements Omit<ConfigurationData, 'rootDirectory'> {
7676
return path.resolve(this.repoRoot, relativePath);
7777
}
7878

79+
get branch(): string {
80+
return this._branch;
81+
}
82+
83+
set branch(value: string) {
84+
this._branch = value;
85+
}
86+
7987
private loadConfiguration(): void {
8088
// First try to get from environment variables
8189
const rootDirectory = process.env.INPUT_ROOT_DIRECTORY;
@@ -136,6 +144,9 @@ export class Configuration implements Omit<ConfigurationData, 'rootDirectory'> {
136144
process.env.INPUT_REVIEWERS,
137145
[]
138146
);
147+
148+
this._branch = process.env.INPUT_BRANCH || 'develop';
149+
console.log('Using branch:', this._branch);
139150
}
140151

141152
private parseCommaSeparatedInput(input: string | undefined, defaultValue: string[]): string[] {

0 commit comments

Comments
 (0)