Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to sent comment #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}
Expand Down
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down