Skip to content

Commit 9fb549c

Browse files
authored
Merge branch 'main' into hectahertz/getResponsiveAttributes-SegmentedControl
2 parents 902c011 + e7e3342 commit 9fb549c

File tree

295 files changed

+1285
-1385
lines changed

Some content is hidden

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

295 files changed

+1285
-1385
lines changed

.changeset/busy-masks-kiss.md

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

.changeset/easy-poets-travel.md

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

.changeset/empty-oranges-hear.md

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

.changeset/lovely-files-invent.md

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

.changeset/old-yaks-win.md

Lines changed: 5 additions & 0 deletions

.changeset/styled-react-peer-deps.md

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

.changeset/thin-planets-taste.md

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

.changeset/wild-aliens-itch.md

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

.github/workflows/recommend-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Get source files changes
2020
id: source-files
2121
run: |
22-
DIFF=$(git diff --name-only origin/main | grep 'packages/react' | grep -Ev '.stories.tsx|.docs.json' || true)
22+
DIFF=$(git diff --name-only origin/main | grep 'packages/react' | grep -Ev '.stories.tsx|.stories.module.css|.docs.json' || true)
2323
if [ -z "$DIFF" ]; then
2424
echo "diff=" >> $GITHUB_OUTPUT
2525
else

.github/workflows/status-checks.yml

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
11
name: status-checks
22

33
on:
4+
issue_comment:
5+
types: [created]
46
pull_request:
57
types: [labeled, opened, reopened, synchronize]
8+
merge_group:
9+
branches:
10+
- main
11+
types: [checks_requested]
612

713
permissions:
14+
issues: write
815
pull-requests: write
9-
statuses: write
1016

1117
jobs:
1218
github-ui:
1319
runs-on: ubuntu-latest
14-
if: "${{ contains(github.event.pull_request.labels.*.name, 'integration-tests: skipped manually') }}"
20+
if: "${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'integration-tests: skipped manually')) || github.event_name == 'merge_group' || (github.event_name == 'issue_comment' && github.event.issue.pull_request != null) }}"
1521
steps:
1622
- name: Generate token for primer
1723
id: generate_primer_token
1824
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
1925
with:
2026
app-id: 902635
2127
owner: 'primer'
28+
repositories: 'react'
2229
private-key: ${{ secrets.PRIMER_INTEGRATION_APP_PRIVATE_KEY }}
23-
- name: Override status checks
30+
permission-statuses: 'write'
31+
32+
# Support for reporting on required github-ui status checks on pull requests
33+
- name: Override status checks for pull request
34+
if: "${{ github.event_name == 'pull_request' }}"
2435
run: |
2536
# Get the timeline event ID for the label being added
2637
EVENT_ID=$(gh api "/repos/primer/react/issues/$PR_NUMBER/timeline" \
@@ -47,5 +58,57 @@ jobs:
4758
-f target_url="$TARGET_URL"
4859
env:
4960
GH_TOKEN: ${{ steps.generate_primer_token.outputs.token }}
50-
SHA: ${{ github.event.pull_request.head.sha }}
5161
PR_NUMBER: ${{ github.event.pull_request.number }}
62+
SHA: ${{ github.event.pull_request.head.sha }}
63+
64+
# Support for reporting on required github-ui status checks in merge queues
65+
- name: Override status checks for merge queue
66+
if: "${{ github.event_name == 'merge_group' }}"
67+
run: |
68+
gh api -X POST "/repos/primer/react/statuses/${{ github.event.merge_group.head_sha }}" \
69+
-f state='success' \
70+
-f context='github-ui / ci' \
71+
-f description='Skipped'
72+
73+
gh api -X POST "/repos/primer/react/statuses/${{ github.event.merge_group.head_sha }}" \
74+
-f state='success' \
75+
-f context='github-ui / projects' \
76+
-f description='Skipped'
77+
env:
78+
GH_TOKEN: ${{ steps.generate_primer_token.outputs.token }}
79+
80+
# Support for reporting on required github-ui status checks via issue comment, useful for Pull Requests from forks
81+
- name: Issue comment command
82+
if: ${{ github.event_name == 'issue_comment' }}
83+
id: command
84+
uses: github/command@4002f2aad7964e6d776c2f91bd3f1f87bf6af793 # v2.0.2
85+
with:
86+
command: '.skip-integration-checks'
87+
allowed_contexts: pull_request
88+
# Note: this permission step is _critical_ to make sure only maintainers can run the command
89+
permissions: 'write,admin'
90+
allow_forks: true
91+
- name: Override status checks for issue comment
92+
if: ${{ github.event_name == 'issue_comment' && steps.command.outputs.continue == 'true' }}
93+
run: |
94+
SHA=$(gh pr view $NUMBER --json headRefOid --jq '.headRefOid')
95+
if [ -z "$SHA" ]; then
96+
echo "No pull request found for issue #$NUMBER, or gh pr view failed."
97+
exit 1
98+
fi
99+
100+
gh api -X POST "/repos/primer/react/statuses/$SHA" \
101+
-f state='success' \
102+
-f context='github-ui / ci' \
103+
-f description='Manual override' \
104+
-f target_url="$COMMENT_URL"
105+
106+
gh api -X POST "/repos/primer/react/statuses/$SHA" \
107+
-f state='success' \
108+
-f context='github-ui / projects' \
109+
-f description='Manual override' \
110+
-f target_url="$COMMENT_URL"
111+
env:
112+
COMMENT_URL: ${{ github.event.comment.html_url }}
113+
GH_TOKEN: ${{ steps.generate_primer_token.outputs.token }}
114+
NUMBER: ${{ github.event.issue.number }}

0 commit comments

Comments
 (0)