Skip to content

Commit

Permalink
Merge pull request github#35881 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Jan 10, 2025
2 parents dee41b3 + d32460b commit fd57f0f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/delete-orphan-translation-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/sync-audit-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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' }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/sync-secret-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down

0 comments on commit fd57f0f

Please sign in to comment.