Use --head workaround for gh pr create (#53834)
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
11
.github/workflows/sync-audit-logs.yml
vendored
11
.github/workflows/sync-audit-logs.yml
vendored
@@ -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' }}
|
||||
|
||||
3
.github/workflows/sync-secret-scanning.yml
vendored
3
.github/workflows/sync-secret-scanning.yml
vendored
@@ -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' }}
|
||||
|
||||
Reference in New Issue
Block a user