Skip to content

Commit

Permalink
chore: extended commit message also for GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesHoppe committed Jan 5, 2020
1 parent 7a79539 commit 4925bc8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ Learn more about ["personal access tokens" here](https://help.github.com/article
- Example: `ng deploy --message="What could possibly go wrong?"`

The commit message **must be wrapped in quotes** if there are any spaces in the text.
Some handy additional text is always added,
if the environment variable `TRAVIS` exists (for Travis CI) or
if the environment variable `CIRCLECI` exists (for Circle CI).
Some additional text is always added to the message, if the command runs on Travis CI, Circle CI or GitHub Actions.

#### --branch <a name="branch"></a>

Expand Down
10 changes: 10 additions & 0 deletions src/engine/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ export async function prepareOptions(
process.env.CIRCLE_BUILD_URL;
}

if (process.env.GITHUB_ACTIONS) {
options.message +=
'\n\n' +
'Triggered by commit: https://github.com/' +
process.env.GITHUB_REPOSITORY +
'/' +
'/commit/' +
process.env.GITHUB_SHA;
}

// NEW in 0.6.2: always discover remote URL (if not set)
// this allows us to inject tokens from environment even if `--repo` is not set manually
if (!options.repo) {
Expand Down

0 comments on commit 4925bc8

Please sign in to comment.