diff --git a/.github/workflows/sync-rush-versions.yml b/.github/workflows/sync-rush-versions.yml index 15fcb55..6e19d47 100644 --- a/.github/workflows/sync-rush-versions.yml +++ b/.github/workflows/sync-rush-versions.yml @@ -1,6 +1,6 @@ name: Sync Rush.json Version on: - pull_request_target: + pull_request: types: [opened, synchronize] paths: - "**/package.json" @@ -20,8 +20,6 @@ jobs: steps: - uses: actions/checkout@v6 with: - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 2 # Fetch current commit + previous commit - name: Detect Rush bump id: detect @@ -44,8 +42,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.head_ref }} - name: Setup Node uses: actions/setup-node@v6 @@ -71,8 +68,8 @@ jobs: - name: Commit changes run: | - git config --global user.name "dependabot[bot]" - git config --global user.email "49699333+dependabot[bot]@users.noreply.github.com" + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" # Add files that exist if [ -f rush.json ]; then git add rush.json; fi if [ -f common-versions.json ]; then git add common-versions.json; fi