Skip to content

Commit dd2a747

Browse files
authored
Merge pull request #114 from hukuuu/fix/pr-respect-base
2 parents 8174f43 + fc2b313 commit dd2a747

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

dist/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -41662,11 +41662,13 @@ function getInputs() {
4166241662
required: false
4166341663
});
4166441664
const prTitle = core.getInput('prTitle', { required: false });
41665+
const base = core.getInput('base', { required: false });
4166541666
return {
4166641667
repoToken,
4166741668
includeMigrationsFile: Boolean(includeMigrationsFile),
4166841669
legacyPeerDeps: Boolean(legacyPeerDeps),
41669-
prTitle
41670+
prTitle,
41671+
base
4167041672
};
4167141673
}
4167241674
exports.getInputs = getInputs;
@@ -41756,7 +41758,7 @@ function run() {
4175641758
yield (0, git_1.pushChangesToRemote)(branchName);
4175741759
core.info(`Pushed changes to origin/${branchName}`);
4175841760
core.debug('Creating Pull Request...');
41759-
const { data: newPr } = yield octokit.rest.pulls.create(Object.assign(Object.assign({}, github.context.repo), { title: inputs.prTitle.replace('$VERSION', latestNxVersion), body: (0, git_1.makePRBody)(latestNxGHRelease.created_at, latestNxGHRelease.html_url), head: branchName, base: 'main' }));
41761+
const { data: newPr } = yield octokit.rest.pulls.create(Object.assign(Object.assign({}, github.context.repo), { title: inputs.prTitle.replace('$VERSION', latestNxVersion), body: (0, git_1.makePRBody)(latestNxGHRelease.created_at, latestNxGHRelease.html_url), head: branchName, base: inputs.base }));
4176041762
core.info(`Pull Request created: ${newPr.issue_url}`);
4176141763
core.setOutput('prId', newPr.number);
4176241764
}

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/inputs-helper.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ export function getInputs(): Inputs {
1111
})
1212
const prTitle = core.getInput('prTitle', {required: false})
1313

14+
const base = core.getInput('base', {required: false})
15+
1416
return {
1517
repoToken,
1618
includeMigrationsFile: Boolean(includeMigrationsFile),
1719
legacyPeerDeps: Boolean(legacyPeerDeps),
18-
prTitle
20+
prTitle,
21+
base
1922
}
2023
}

src/inputs.model.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export default interface Inputs {
33
prTitle: string
44
includeMigrationsFile: boolean
55
legacyPeerDeps: boolean
6+
base: string
67
}

src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async function run(): Promise<void> {
7373
latestNxGHRelease.html_url
7474
),
7575
head: branchName,
76-
base: 'main'
76+
base: inputs.base
7777
})
7878

7979
core.info(`Pull Request created: ${newPr.issue_url}`)

0 commit comments

Comments
 (0)