diff --git a/.github/workflows/delete-orphan-translation-files.yml b/.github/workflows/delete-orphan-translation-files.yml index da1e7cec5edb..350f9992cff6 100644 --- a/.github/workflows/delete-orphan-translation-files.yml +++ b/.github/workflows/delete-orphan-translation-files.yml @@ -129,7 +129,8 @@ jobs: --title "Delete orphan files ($current_daystamp)" \ --body '👋 humans. This PR was generated from docs-internal/.github/workflows/delete-orphan-translation-files.yml. ' \ - --repo "${{ matrix.language_repo }}" + --repo "${{ matrix.language_repo }}" \ + --head=$branch_name echo "Merge created PR..." retry_command gh pr merge --merge --auto --delete-branch "$branch_name" diff --git a/.github/workflows/sync-audit-logs.yml b/.github/workflows/sync-audit-logs.yml index f0226617d16b..75b371cb2d18 100644 --- a/.github/workflows/sync-audit-logs.yml +++ b/.github/workflows/sync-audit-logs.yml @@ -54,7 +54,11 @@ jobs: # If nothing to commit, exit now. It's fine. No orphans. changes=$(git diff --name-only | wc -l) untracked=$(git status --untracked-files --short | wc -l) - if [[ $changes -eq 0 ]] && [[ $untracked -eq 0 ]]; then + filesChanged=$(git diff --name-only) + # There will always be at least one file changed: + # src/audit-logs/lib/config.json + # If the config file is the only file changed, exit. + if [[ $changes -eq 1 ]] && [[ $untracked -eq 1 ]] && [[ $filesChanged == *lib/config.json ]]; then echo "There are no changes to commit or untracked files. Exiting..." exit 0 fi @@ -83,7 +87,8 @@ jobs: If CI does not pass or other problems arise, contact #docs-engineering on slack.' \ --repo github/docs-internal \ - --label audit-log-pipeline + --label audit-log-pipeline \ + --head=$branchname # can't approve your own PR, approve with Actions unset GITHUB_TOKEN @@ -93,7 +98,7 @@ jobs: # Actions can't merge the PR so back to docs-bot to merge the PR unset GITHUB_TOKEN gh auth login --with-token <<< "${{ secrets.DOCS_BOT_PAT_WORKFLOW_READORG }}" - gh pr merge --auto --delete-branch + gh pr merge --auto - uses: ./.github/actions/slack-alert if: ${{ failure() && github.event_name != 'workflow_dispatch' }} diff --git a/.github/workflows/sync-secret-scanning.yml b/.github/workflows/sync-secret-scanning.yml index 8a1ef68e338a..9d90f9b9606a 100644 --- a/.github/workflows/sync-secret-scanning.yml +++ b/.github/workflows/sync-secret-scanning.yml @@ -76,7 +76,8 @@ jobs: If CI does not pass or other problems arise, contact #docs-engineering on Slack.' \ --repo github/docs-internal \ - --label secret-scanning-pipeline,'skip FR board',ready-for-doc-review + --label secret-scanning-pipeline,'skip FR board',ready-for-doc-review \ + --head=$branchname - uses: ./.github/actions/slack-alert if: ${{ failure() && github.event_name != 'workflow_dispatch' }}