Skip to content

Commit

Permalink
Add releaseUrl to message context (resolves #1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 23, 2023
1 parent d931f36 commit 07f373e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -252,6 +252,7 @@ changelog
name
repo.remote, repo.protocol, repo.host, repo.owner, repo.repository, repo.project
branchName
releaseUrl
```

All variables are available in all hooks. The only exception is that the additional variables listed above are not yet
Expand Down
1 change: 1 addition & 0 deletions lib/plugin/github/GitHub.js
Expand Up @@ -248,6 +248,7 @@ class GitHub extends Release {
this.debug(response.data);
const { html_url, upload_url, id } = response.data;
this.setContext({ isReleased: true, releaseId: id, releaseUrl: html_url, upload_url });
this.config.setContext({ isReleased: true, releaseId: id, releaseUrl: html_url, upload_url });
this.log.verbose(`octokit repos.createRelease: done (${response.headers.location})`);
return response.data;
} catch (err) {
Expand Down
1 change: 1 addition & 0 deletions lib/plugin/gitlab/GitLab.js
Expand Up @@ -219,6 +219,7 @@ class GitLab extends Release {
await this.request(endpoint, options);
this.log.verbose('gitlab releases#createRelease: done');
this.setContext({ isReleased: true, releaseUrl });
this.config.setContext({ isReleased: true, releaseUrl });
return true;
} catch (err) {
this.debug(err);
Expand Down

0 comments on commit 07f373e

Please sign in to comment.