Skip to content
Merged
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ This action posts the code and a SAST report to the Mobb vulnerability analysis

**Optional** `true` or `false`. This requires `auto-pr` to be set to `true`. Once set, Fixes will be committed directly to the source branch.

## `organization-id`

**Optional** The Organization ID to use with the Mobb platform. If not specified, the default organization will be used.


## Outputs

Expand Down
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ inputs:
commit-directly:
description: "Commit Directly flag, this requires Auto-PR flag to be set. Once enabled, Mobb will commit the fixes directly to the branch"
required: false
organization-id:
description: "Organization ID"
required: false

outputs:
fix-report-url:
Expand All @@ -47,6 +50,12 @@ runs:
MobbExecString+=" --mobb-project-name \"${{ inputs.mobb-project-name }}\""
fi

# Check if organization-id exists and append it
if [ -n "${{ inputs.organization-id }}" ]; then
echo "organization-id specified: ${{ inputs.organization-id }}"
MobbExecString+=" --organization-id \"${{ inputs.organization-id }}\""
fi

# Check if auto-pr flag is set append it
if [ "${{ inputs.auto-pr }}" == "true" ]; then
echo "Auto-PR flag is set"
Expand Down
8 changes: 2 additions & 6 deletions review/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,7 @@ runs:

# Output the final command string for debugging
echo "Mobb Command: $MobbExecString"
OUT=$(eval $MobbExecString)

RETVAL=$?
if [ $RETVAL -ne 0 ]; then
exit $RETVAL
fi
OUT=$(eval $MobbExecString || true)
OUT=$(echo $OUT | tr '\n' ' ')

echo "fix-report-url=$OUT" >> $GITHUB_OUTPUT
Expand All @@ -84,6 +79,7 @@ runs:
shell: bash -l {0}

- uses: Sibz/github-status-action@v1
if: ${{ startsWith(steps.run-npx-mobb-dev.outputs.fix-report-url, 'https://') }}
with:
authToken: ${{ inputs.github-token }}
context: "Mobb fix report link"
Expand Down
Loading