release-it 17.0.5 → 17.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -139,12 +139,16 @@ class GitHub extends Release {
139
139
  return this.step({ task, label: 'Generating link to GitHub Release web interface', prompt: 'release' });
140
140
  } else if (isCI) {
141
141
  await this.step({ task: () => this[publishMethod](), label: `GitHub ${type} release` });
142
- return this.step({ enabled: assets, task: () => this.uploadAssets(), label: 'GitHub upload assets' });
142
+ await this.step({ enabled: assets, task: () => this.uploadAssets(), label: 'GitHub upload assets' });
143
+ return this.step({
144
+ task: () => (isUpdate ? Promise.resolve() : this.commentOnResolvedItems()),
145
+ label: 'GitHub comment on resolved items'
146
+ });
143
147
  } else {
144
148
  const release = async () => {
145
149
  await this[publishMethod]();
146
150
  await this.uploadAssets();
147
- return isUpdate ? Promise.resolve() : this.commentOnResolvedItems();
151
+ return isUpdate ? Promise.resolve(true) : this.commentOnResolvedItems();
148
152
  };
149
153
  return this.step({ task: release, label: `GitHub ${type} release`, prompt: 'release' });
150
154
  }
@@ -373,10 +377,10 @@ class GitHub extends Release {
373
377
  const { owner, project: repo } = this.getContext('repo');
374
378
  const changelog = await this.getChangelog();
375
379
  const { comments } = this.options;
376
- const { submit, issue, pr } = comments;
380
+ const { submit, issue, pr } = comments ?? {};
377
381
  const context = this.getContext();
378
382
 
379
- if (!submit || !changelog) return;
383
+ if (!submit || !changelog) return true;
380
384
 
381
385
  const shas = getCommitsFromChangelog(changelog);
382
386
  const searchResults = await Promise.all(searchQueries(this.client, owner, repo, shas));
@@ -392,7 +396,7 @@ class GitHub extends Release {
392
396
 
393
397
  if (isDryRun) {
394
398
  this.log.exec(`octokit issues.createComment (${url})`, { isDryRun });
395
- return;
399
+ return Promise.resolve();
396
400
  }
397
401
 
398
402
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-it",
3
- "version": "17.0.5",
3
+ "version": "17.1.1",
4
4
  "description": "Generic CLI tool to automate versioning and package publishing-related tasks.",
5
5
  "keywords": [
6
6
  "build",