Skip to content

Commit c53bd04

Browse files
authored
Merge branch 'main' into patch-2
2 parents d5db61f + f662911 commit c53bd04

File tree

1,583 files changed

+1580669
-361845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,583 files changed

+1580669
-361845
lines changed

.github/actions-scripts/update-merge-queue-branch.js

Lines changed: 0 additions & 158 deletions
This file was deleted.

.github/workflows/autoupdate-branch.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/azure-preview-env-deploy.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,16 +200,6 @@ jobs:
200200
# Deploy ARM template is idempotent
201201
# Note: once the resources exist the image tag must change for a new deployment to occur (the image tag includes workflow run number, run attempt, as well as sha)
202202
- name: Run ARM deploy
203-
# This 'if' will be truth, if this workflow is...
204-
# - run as a workflow_dispatch
205-
# - run because of a push to main (or when added to a merge queue)
206-
# - run as a regular pull request
207-
# But if it's a pull request, *and* for whatever reason, the pull
208-
# request has "Auto-merge" enabled, don't bother.
209-
# The idea is that if auto-merge has been abled, by humans or by
210-
# bots, they have no intention of viewing the deployed preview anyway.
211-
# This saves time because the PR can merge sooner.
212-
if: ${{ !github.event.pull_request.auto_merge }}
213203
uses: azure/arm-deploy@841b12551939c88af8f6df767c24c38a5620fd0d
214204
with:
215205
resourceGroupName: ${{ secrets.PREVIEW_ENV_RESOURCE_GROUP }}
@@ -223,8 +213,6 @@ jobs:
223213
dockerRegistryPassword="${{ secrets.NONPROD_REGISTRY_PASSWORD }}"
224214

225215
- name: Check that it can reached
226-
# To match the "Run ARM deploy" step above
227-
if: ${{ !github.event.pull_request.auto_merge }}
228216
# This introduces a necessary delay. Because the preview evironment
229217
# URL is announced to the pull request as soon as all the steps
230218
# finish, what sometimes happens is that a viewer of the PR clicks

.github/workflows/link-check-all.yml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,46 @@ jobs:
3838
- name: Install
3939
run: npm ci
4040

41-
# Creates file "${{ env.HOME }}/files.json", among others
4241
- name: Gather files changed
43-
uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b
44-
with:
45-
fileOutput: 'json'
42+
env:
43+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
PR: ${{ github.event.pull_request.number }}
45+
HEAD: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
46+
run: |
47+
# Find the file diff in the pull request or merge group
48+
# If its a pull request, use the faster call to the GitHub API
49+
# For push, workflow_dispatch, and merge_group, use git diff
50+
if [ -n "$PR" ]
51+
then
52+
echo __ running gh pr diff __
53+
DIFF=`gh pr diff $PR --name-only`
54+
elif [ -n "$HEAD" ]
55+
then
56+
echo __ running git fetch main __
57+
git fetch origin main --depth 1
58+
echo __ running git diff __
59+
DIFF=`git diff --name-only origin/main`
60+
else
61+
echo __ no head, empty diff __
62+
DIFF=''
63+
fi
64+
# So we can inspect the output
65+
echo __ DIFF found __
66+
echo $DIFF
4667
47-
# For verification
48-
- name: Show files changed
49-
run: cat $HOME/files.json
68+
# Formats into single line JSON array, removing any empty strings
69+
echo __ format, write to files.json __
70+
echo $DIFF | \
71+
tr ' ' '\n' | \
72+
jq --raw-input | \
73+
jq --slurp --compact-output 'map(select(length > 0))' \
74+
> $HOME/files.json
5075
5176
- name: Link check (warnings, changed files)
5277
env:
5378
# Don't care about CDN caching image URLs
5479
DISABLE_REWRITE_ASSET_URLS: true
5580
run: |
56-
5781
# Note as of Aug 2022, we *don't* check external links
5882
# on the pages you touched in the PR. We could enable that
5983
# but it has the added risk of false positives blocking CI.

.github/workflows/site-policy-reminder.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Site Policy Reminder
22

3-
# **What it does**: Automated comment reminder on a PR to change the title for public consumption before merging
4-
# **Why we have it**: Titles of merged PRs to Site Policies are sent to the public site-policy repo
5-
# **Who does it impact**: Docs team merging changes to Site Policies
3+
# **What it does**: Automated comment reminder on a PR to change the title for public consumption before merging and to run the Site Policy repo sync action
4+
# **Why we have it**: Titles of merged PRs to Site Policies are sent to the public site-policy repo when the repos are synced
5+
# **Who does it impact**: Everyone merging changes to Site Policies
66

77
on:
88
pull_request:
@@ -26,3 +26,5 @@ jobs:
2626
issue-number: ${{ github.event.pull_request.number }}
2727
body: |
2828
Before merging, please remember to change the title of this PR to a description of its changes that is suitable for public viewing on github/site-policy.
29+
30+
<@github/site-policy-admins>, when these changes are ready to be synced to the site policy repo for the 24-hour or 30-day [review window](https://github.com/github/site-policy#whats-the-process), run the [site policy sync action](https://github.com/github/docs-internal/actions/workflows/site-policy-sync.yml) from this PR's branch. When these changes are ready to be merged in `docs-internal`, let the Docs team know on Slack in #docs-content and a writer will merge this PR.

.github/workflows/site-policy-sync.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
echo "DESCRIPTION=$DESCRIPTION" >> $GITHUB_ENV
5454
git commit -m "$(echo $DESCRIPTION)"
5555
56-
- name: If there are changes to push, create a pull request in the public repo using the gh command line tool, then immediately merge the PR and delete the branch
56+
- name: If there are changes to push, create a pull request in the public repo using the gh command line tool, then immediately approve the PR
5757
id: createAndMergePullRequest
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.API_TOKEN_SITEPOLICY }}
@@ -70,11 +70,7 @@ jobs:
7070
git push --set-upstream origin automated-sync-$GITHUB_RUN_ID
7171
PR_URL=$(gh pr create --title "${TITLE}" --body-file msg --head automated-sync-$GITHUB_RUN_ID --base main --repo github/site-policy)
7272
gh pr diff ${PR_URL}
73-
gh pr merge ${PR_URL} --merge --delete-branch
73+
gh pr review --approve || echo "Nothing to approve"
7474
else
7575
echo "No updates to push to the public repo"
7676
fi
77-
78-
- name: Delete remote updates branch if previous step failed
79-
if: failure() && steps.createAndMergePullRequest.outcome == 'failure'
80-
run: git push github/site-policy --delete automated-sync-$GITHUB_RUN_ID

.github/workflows/sync-search-elasticsearch.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
permissions:
1414
contents: read
1515

16+
# This allows a subsequently queued workflow run to cancel previous runs
17+
concurrency:
18+
group: '${{ github.workflow }} @ ${{ github.head_ref }}'
19+
cancel-in-progress: true
20+
1621
env:
1722
FREEZE: ${{ secrets.FREEZE }}
1823
ELASTICSEARCH_URL: ${{ secrets.ELASTICSEARCH_URL }}

0 commit comments

Comments
 (0)