diff --git a/README.md b/README.md index 8e56622..157b2a5 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Optionally set `ROLLBAR_USERNAME` environment variable, usernames can be found a | `source_maps` | `false` | | JS source map files. | | `minified_urls` | `false` | | Minified URLs linked to source maps above | | `local_username`| `false` | | Username of the deploying user. Alternative to setting ROLLBAR_USERNAME | +| `comment` | `false` | | Optional message for the deploy | ### Outputs @@ -47,6 +48,7 @@ steps: with: environment: 'production' version: ${{ github.sha }} + comment: ${{ github.event.head_commit.message }} env: ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }} ROLLBAR_USERNAME: ${{ github.actor }} diff --git a/entrypoint.sh b/entrypoint.sh index dbc8576..b43baea 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,6 +6,7 @@ STATUS=$3 SOURCE_MAP_FILES=$4 MINIFIED_FILES=$5 LOCAL_USERNAME=$6 +COMMENT=$7 # Ensure that the ROLLBAR_ACCESS_TOKEN secret is included if [[ -z "$ROLLBAR_ACCESS_TOKEN" ]]; then @@ -38,7 +39,8 @@ RESPONSE=$(curl -X $METHOD https://api.rollbar.com/api/1/deploy/$DEPLOY_ID \ --form revision=$VERSION \ --form status=$STATUS \ --form rollbar_username=$ROLLBAR_USERNAME \ - --form local_username=$LOCAL_USERNAME) + --form local_username=$LOCAL_USERNAME) \ + --form comment=$COMMENT) # Get the deploy id depending on the response as they are different for POST and PATCH if [[ $METHOD == "POST" ]]; then