Skip to content
Open
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
24 changes: 21 additions & 3 deletions .github/workflows/preview.build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ on:
description: If provided, downloads a previously uploaded artifact (has to be in the same workflow). Both artifactPath and artifactName have to be passed.
default: ""
type: string
PREPROD_PREVIEW_ENABLED:
description: Whether to include preprod preview URL in comment (for apps with preprod preview environments)
required: false
type: boolean
default: false
secrets:
AWS_ROLE_TO_ASSUME:
required: true
Expand Down Expand Up @@ -87,9 +92,22 @@ jobs:
if: ${{ inputs.GHA_TRIGGER_EVENT != 'synchronize' }}
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment-pr job is missing required permissions to comment on pull requests. The thollander/actions-comment-pull-request action requires pull-requests: write permission. Add a permissions block to this job similar to what exists in other workflows (e.g., pr.yaml:21-23).

Suggested change
if: ${{ inputs.GHA_TRIGGER_EVENT != 'synchronize' }}
if: ${{ inputs.GHA_TRIGGER_EVENT != 'synchronize' }}
permissions:
pull-requests: write

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
steps:
- name: Build comment message
id: build-message
run: |
MESSAGE="Preview URL: https://${{ inputs.APPLICATION_NAME }}-preview-${{ inputs.PR_NUMBER }}.staging.parcellab.dev"
if [ "${{ inputs.PREPROD_PREVIEW_ENABLED }}" == "true" ]; then
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use single equals sign for string comparison to be consistent with the established convention in this codebase. See kubernetes.yaml:206 which uses the pattern if [ "$VAR" = "true" ]; then for boolean string comparison.

Copilot uses AI. Check for mistakes.
MESSAGE="${MESSAGE}
Preview URL (preprod): https://${{ inputs.APPLICATION_NAME }}-preprod-preview-${{ inputs.PR_NUMBER }}.staging.parcellab.dev"
fi
MESSAGE="${MESSAGE}
Preview Argo App: https://argocd.staging.parcellab.dev/applications/argocd/${{ inputs.APPLICATION_NAME }}-preview-${{ inputs.PR_NUMBER }}"
Comment on lines +100 to +104
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multiline string concatenation includes leading whitespace that will appear in the PR comment. The indentation before "Preview URL (preprod)" on line 101 will be preserved in the output. Consider removing the leading spaces to ensure consistent formatting of the PR comment, or ensure this indentation is intentional.

Suggested change
MESSAGE="${MESSAGE}
Preview URL (preprod): https://${{ inputs.APPLICATION_NAME }}-preprod-preview-${{ inputs.PR_NUMBER }}.staging.parcellab.dev"
fi
MESSAGE="${MESSAGE}
Preview Argo App: https://argocd.staging.parcellab.dev/applications/argocd/${{ inputs.APPLICATION_NAME }}-preview-${{ inputs.PR_NUMBER }}"
MESSAGE="${MESSAGE}"$'\n'"Preview URL (preprod): https://${{ inputs.APPLICATION_NAME }}-preprod-preview-${{ inputs.PR_NUMBER }}.staging.parcellab.dev"
fi
MESSAGE="${MESSAGE}"$'\n'"Preview Argo App: https://argocd.staging.parcellab.dev/applications/argocd/${{ inputs.APPLICATION_NAME }}-preview-${{ inputs.PR_NUMBER }}"

Copilot uses AI. Check for mistakes.
{
echo "message<<EOF"
echo "$MESSAGE"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
with:
message: |
Preview URL: https://${{ inputs.APPLICATION_NAME }}-preview-${{ inputs.PR_NUMBER }}.staging.parcellab.dev
Preview Argo App: https://argocd.staging.parcellab.dev/applications/argocd/${{ inputs.APPLICATION_NAME }}-preview-${{ inputs.PR_NUMBER }}
message: ${{ steps.build-message.outputs.message }}