Skip to content

Commit

Permalink
fix: github release success comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ruscon committed Sep 13, 2023
1 parent 08d681c commit 01dbcbd
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/nx-semantic-release-pnpm/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
],
"buildTarget": "nx-semantic-release-pnpm:build",
"repositoryUrl": "https://github.com/ruscon/nx-semantic-release-pnpm",
"commitMessage": "chore(release): ${nextRelease.gitTag} [skip ci]\n\n${nextRelease.notes}",
"github": true,
"outputPath": "dist/packages/nx-semantic-release-pnpm",
"releaseRules": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
} from './apply-tokens';

const requiredOptions: SemanticReleaseOptions = {
repositoryUrl: '',
changelog: true,
changelogFile: '',
commitMessage: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const resolvePlugins = (

if (options.github) {
defaultPlugins.push(['@semantic-release/github', {
successComment: ":tada: This ${issue.pull_request ? 'pull request has been included in' : 'issue has been resolved in'} the **[${nextRelease.gitTag}](../releases/tag/${nextRelease.gitTag})** release.\n\n_Automatically generated by [semantic-release](https://github.com/semantic-release/semantic-release).",
successComment: `:tada: This \${issue.pull_request ? 'pull request has been included in' : 'issue has been resolved in'} the **[\${nextRelease.gitTag}](${options.repositoryUrl}/releases/tag/\${nextRelease.gitTag})** release.\n\nAutomatically generated by [semantic-release](https://github.com/semantic-release/semantic-release).`,
}]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('parseTag', () => {

describe.skip('resolveOptions', () => {
const requiredOptions: SemanticReleaseOptions = {
repositoryUrl: '',
changelog: true,
changelogFile: '',
commitMessage: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type SemanticReleaseOptions = Omit<
BaseSemanticReleaseOptions,
'extends'
> & {
repositoryUrl: string;
npm: boolean;
github: boolean;
buildTarget?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe.skip('Setup project', () => {
assertProjectConfiguration({
executor: '@ruscon/nx-semantic-release-pnpm:semantic-release',
options: {
repositoryUrl: '',
github: true,
changelog: true,
npm: true,
Expand All @@ -49,6 +50,7 @@ describe.skip('Setup project', () => {
assertProjectConfiguration({
executor: '@ruscon/nx-semantic-release-pnpm:semantic-release',
options: {
repositoryUrl: '',
github: false,
changelog: false,
npm: false,
Expand Down
4 changes: 2 additions & 2 deletions packages/nx-semantic-release-pnpm/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"],
"files": ["./src/typings/semantic-release-plugin-decorators.d.ts"]
"resolveJsonModule": true
},
"exclude": ["**/*.spec.ts", "**/*.test.ts", "**/tests", "jest.config.ts"],
"include": ["**/*.ts"]
"include": ["**/*.ts", "**/*.json"]
}

0 comments on commit 01dbcbd

Please sign in to comment.