Skip to content

Commit

Permalink
remove release message from pr body
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmasberg committed Sep 23, 2023
1 parent 8b8c782 commit c4d33f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
7 changes: 2 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21227,11 +21227,8 @@ function pushChangesToRemote(branchName) {
});
}
exports.pushChangesToRemote = pushChangesToRemote;
function makePRBody(releaseNotes, publishedAt, releaseUrl) {
function makePRBody(publishedAt, releaseUrl) {
return `This PR migrates the project to the latest stable version of NX.

**NX Release Notes:**
${releaseNotes}

**Published:**
${publishedAt}
Expand Down Expand Up @@ -21381,7 +21378,7 @@ function run() {
yield (0, git_1.pushChangesToRemote)(branchName);
core.info(`Pushed changes to origin/${branchName}`);
core.debug('Creating Pull Request...');
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.body || 'No release notes', latestNxGHRelease.created_at, latestNxGHRelease.html_url), head: branchName, base: 'main' }));
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' }));
core.info(`Pull Request created: ${newPr.issue_url}`);
core.setOutput('prId', newPr.number);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@ export async function pushChangesToRemote(branchName: string): Promise<void> {
await exec(`git push --force-with-lease -u origin ${branchName}`)
}

export function makePRBody(
releaseNotes: string,
publishedAt: string,
releaseUrl: string
): string {
export function makePRBody(publishedAt: string, releaseUrl: string): string {
return `This PR migrates the project to the latest stable version of NX.
**NX Release Notes:**
${releaseNotes}
**Published:**
${publishedAt}
Expand Down
1 change: 0 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ async function run(): Promise<void> {
...github.context.repo,
title: inputs.prTitle.replace('$VERSION', latestNxVersion),
body: makePRBody(
latestNxGHRelease.body || 'No release notes',
latestNxGHRelease.created_at,
latestNxGHRelease.html_url
),
Expand Down

0 comments on commit c4d33f7

Please sign in to comment.