Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(log-repo): use the original form of the repo url to remove the need to mask credentials #2459

Merged
merged 1 commit into from Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -75,7 +75,7 @@ async function run(context, plugins) {
}

logger[options.dryRun ? 'warn' : 'success'](
`Run automated release from branch ${ciBranch} on repository ${options.repositoryUrl}${
`Run automated release from branch ${ciBranch} on repository ${options.originalRepositoryURL}${
options.dryRun ? ' in dry-run mode' : ''
}`
);
Expand Down Expand Up @@ -263,6 +263,7 @@ module.exports = async (cliOptions = {}, {cwd = process.cwd(), env = process.env
context.logger.log(`Running ${pkg.name} version ${pkg.version}`);
try {
const {plugins, options} = await getConfig(context, cliOptions);
options.originalRepositoryURL = options.repositoryUrl;
context.options = options;
try {
const result = await run(context, plugins);
Expand Down
8 changes: 7 additions & 1 deletion test/index.test.js
Expand Up @@ -90,6 +90,7 @@ test('Plugins are called with expected values', async (t) => {
const config = {
branches: [{name: 'master'}, {name: 'next'}],
repositoryUrl,
originalRepositoryURL: repositoryUrl,
globalOpt: 'global',
tagFormat: `v\${version}`,
};
Expand Down Expand Up @@ -927,7 +928,12 @@ test('Log all "verifyConditions" errors', async (t) => {
const error2 = new SemanticReleaseError('error 2', 'ERR2');
const error3 = new SemanticReleaseError('error 3', 'ERR3');
const fail = stub().resolves();
const config = {branches: [{name: 'master'}], repositoryUrl, tagFormat: `v\${version}`};
const config = {
branches: [{name: 'master'}],
repositoryUrl,
originalRepositoryURL: repositoryUrl,
tagFormat: `v\${version}`,
};
const options = {
...config,
plugins: false,
Expand Down