Skip to content

Commit

Permalink
Potential fix (resolves #1082)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Feb 18, 2024
1 parent 59adb22 commit b46d5bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/plugin/github/GitHub.js
Expand Up @@ -127,6 +127,7 @@ class GitHub extends Release {
}

async release() {
const { assets } = this.options;
const { isWeb, isUpdate } = this.getContext();
const { isCI } = this.config;

Expand All @@ -138,7 +139,7 @@ class GitHub extends Release {
return this.step({ task, label: 'Generating link to GitHub Release web interface', prompt: 'release' });
} else if (isCI) {
await this.step({ task: () => this[publishMethod](), label: `GitHub ${type} release` });
await this.step({ task: () => this.uploadAssets(), label: 'GitHub upload assets' });
await this.step({ enabled: assets, task: () => this.uploadAssets(), label: 'GitHub upload assets' });
return this.step({
task: () => (isUpdate ? Promise.resolve() : this.commentOnResolvedItems()),
label: 'GitHub comment on resolved items'
Expand All @@ -147,7 +148,7 @@ class GitHub extends Release {
const release = async () => {
await this[publishMethod]();
await this.uploadAssets();
return isUpdate ? Promise.resolve() : this.commentOnResolvedItems();
return isUpdate ? Promise.resolve(true) : this.commentOnResolvedItems();
};
return this.step({ task: release, label: `GitHub ${type} release`, prompt: 'release' });
}
Expand Down Expand Up @@ -379,7 +380,7 @@ class GitHub extends Release {
const { submit, issue, pr } = comments ?? {};
const context = this.getContext();

if (!submit || !changelog) return;
if (!submit || !changelog) return true;

const shas = getCommitsFromChangelog(changelog);
const searchResults = await Promise.all(searchQueries(this.client, owner, repo, shas));
Expand All @@ -395,7 +396,7 @@ class GitHub extends Release {

if (isDryRun) {
this.log.exec(`octokit issues.createComment (${url})`, { isDryRun });
return;
return Promise.resolve();
}

try {
Expand Down

0 comments on commit b46d5bd

Please sign in to comment.