Skip to content

Commit 4421d9e

Browse files
authored
Merge branch 'main' into control-custom-update
2 parents 2cd395c + 9e57d36 commit 4421d9e

2,957 files changed

Lines changed: 504259 additions & 38940 deletions

File tree

Some content is hidden

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

.github/blunderbuss.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
assign_issues:
1616
- googlemaps/devrel
1717
assign_prs:
18-
- googlemaps/devrel
18+
- googlemaps/devrel

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ updates:
2020
interval: "weekly"
2121
ignore:
2222
- dependency-name: "three"
23-
- dependency-name: "@types/three"
23+
- dependency-name: "@types/three"

.github/header-checker-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ sourceFileExtensions:
1414
- .sh
1515
- .swift
1616
- .ts
17-
- .yml
17+
- .yml

.github/snippet-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
alwaysCreateStatusCheck: true
22
ignoreFiles:
3-
- "samples/*.sh"
3+
- "samples/*.sh"

.github/workflows/approve-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
ref: ${{ github.event.pull_request.head.ref }} # Checkout the PR's head commit
3838
token: ${{ secrets.GH_MERGE_TOKEN }}
39-
39+
4040
- name: Approve PR
4141
run: gh pr review --approve "$PR_URL"
4242
env:

.github/workflows/dist-pr.yml

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,93 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Create release PR for dist
15+
name: Create, approve, and merge release PR for dist
1616

1717
on:
1818
workflow_dispatch:
1919
inputs:
2020
source_run_id:
21-
description: 'ID of the upstream workflow run that triggered this'
21+
description: "ID of the upstream workflow run that triggered this"
2222
required: false
2323
type: string
2424

2525
jobs:
26-
create-pr:
26+
create-approve-merge-pr:
2727
runs-on: ubuntu-latest
2828
permissions:
2929
pull-requests: write
3030
contents: write
31+
3132
steps:
3233
- name: Checkout code
33-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3435
with:
3536
token: ${{ secrets.GH_MERGE_TOKEN }}
36-
fetch-depth: 0 # Fetch all history
37+
fetch-depth: 0
3738

3839
- name: Set Git Identity
3940
run: |
4041
git config --global user.name 'googlemaps-bot'
4142
git config --global user.email 'googlemaps-bot@google.com'
4243
44+
- name: Ensure temp branch exists on origin
45+
run: |
46+
git fetch origin temp-build-branch:temp-build-branch
47+
git ls-remote --exit-code --heads origin temp-build-branch
48+
49+
- name: Find existing PR
50+
id: find_pr
51+
env:
52+
GH_TOKEN: ${{ secrets.GH_MERGE_TOKEN }}
53+
run: |
54+
PR_URL="$(gh pr list \
55+
--base main \
56+
--head temp-build-branch \
57+
--state open \
58+
--json url \
59+
--jq '.[0].url')"
60+
61+
if [ -n "$PR_URL" ] && [ "$PR_URL" != "null" ]; then
62+
echo "pr_url=$PR_URL" >> "$GITHUB_OUTPUT"
63+
echo "pr_exists=true" >> "$GITHUB_OUTPUT"
64+
else
65+
echo "pr_exists=false" >> "$GITHUB_OUTPUT"
66+
fi
67+
4368
- name: Create Pull Request
69+
id: create_pr
70+
if: steps.find_pr.outputs.pr_exists != 'true'
71+
env:
72+
GH_TOKEN: ${{ secrets.GH_MERGE_TOKEN }}
4473
run: |
45-
gh pr create \
74+
PR_URL="$(gh pr create \
4675
--base main \
4776
--head temp-build-branch \
4877
--title "chore: automated output update (dist)" \
4978
--body "This PR contains updated build output from the dist branch." \
50-
--label "automated pr,dist-update"
79+
--label "automated pr" \
80+
--label "dist-update")"
81+
echo "pr_url=$PR_URL" >> "$GITHUB_OUTPUT"
82+
83+
- name: Determine PR URL
84+
id: pr
85+
run: |
86+
if [ "${{ steps.find_pr.outputs.pr_exists }}" = "true" ]; then
87+
echo "pr_url=${{ steps.find_pr.outputs.pr_url }}" >> "$GITHUB_OUTPUT"
88+
else
89+
echo "pr_url=${{ steps.create_pr.outputs.pr_url }}" >> "$GITHUB_OUTPUT"
90+
fi
91+
92+
- name: Approve PR
5193
env:
52-
GH_TOKEN: ${{ secrets.GH_MERGE_TOKEN }}
94+
PR_URL: ${{ steps.pr.outputs.pr_url }}
95+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
run: |
97+
gh pr review --approve "$PR_URL"
98+
99+
- name: Enable auto-merge
100+
env:
101+
PR_URL: ${{ steps.pr.outputs.pr_url }}
102+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
run: |
104+
gh pr merge --auto --squash --delete-branch "$PR_URL"

.github/workflows/playwright.yml

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

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
branches:
2020
- main
2121
paths:
22-
- 'samples/**'
22+
- "samples/**"
2323

2424
jobs:
2525
release:
@@ -49,9 +49,9 @@ jobs:
4949
restore-keys: |
5050
${{ runner.os }}-node
5151
52-
- uses: actions/setup-node@v3
52+
- uses: actions/setup-node@v4
5353
with:
54-
node-version: '22.x'
54+
node-version: "24.x"
5555

5656
- run: npm i
5757

@@ -93,7 +93,7 @@ jobs:
9393
echo " - samples/$workspace"
9494
rm -rf dist/samples/$workspace
9595
done
96-
96+
9797
- name: Generate Index
9898
run: bash samples/generate-index.sh
9999

@@ -130,6 +130,6 @@ jobs:
130130
uses: benc-uk/workflow-dispatch@v1
131131
with:
132132
workflow: dist-pr.yml
133-
ref: 'temp-build-branch'
133+
ref: "main"
134134
token: ${{ secrets.GH_APPROVER_TOKEN }} # Use the same token that pushed, it needs 'workflows: write' permissions
135135
inputs: '{ "source_run_id": "${{ github.run_id }}" }' # Optional: Pass the run ID for traceability

0 commit comments

Comments
 (0)