Skip to content

Github Action test manual changes #9

Github Action test manual changes

Github Action test manual changes #9

name: Manual Changes Warning
on:
pull_request:
types: [opened, synchronize, ready_for_review]
branches:
- jkv/manual-changes-warning
paths:
- 'packages/ui-extensions/src/surfaces/checkout/**'
- 'packages/ui-extensions/docs/surfaces/checkout/**'
- 'packages/ui-extensions-react/src/surfaces/checkout/**'
- 'packages/ui-extensions-react/docs/surfaces/checkout/**'
jobs:
comment-on-pr:
name: Comment on PR
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'automation') }}
steps:
- uses: actions/checkout@v4
- name: Add comment
run: |
existing_comment=$(gh pr view ${{ github.event.number }} --json comments -q '.comments.[].body' | grep -c '<!-- MARKER -->')
if [[ "$existing_comment" -eq 0 ]]; then
gh pr comment ${{ github.event.number }} -b '<!-- MARKER --> 🔔 This PR appears to be modifying the checkout UI surface for **unstable**. These are typically done via an automated Github action. Did you add these same changes to the private package? See the [vault docs](https://vault.shopify.io/teams/2083/pages/Extension-Libraries~gkKh.md) for details.'
else
echo "Comment already exists on the PR."
fi
shell: bash
env:
GH_TOKEN: ${{ github.token }}