Skip to content

Commit

Permalink
Merge branch 'main' into pageheader-sign-off-fixes-dom-order
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup committed Oct 19, 2023
2 parents 0a78cb3 + 77f8d98 commit f728472
Show file tree
Hide file tree
Showing 80 changed files with 5,078 additions and 2,393 deletions.
7 changes: 0 additions & 7 deletions .changeset/giant-bobcats-deliver.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/happy-rivers-attend.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/purple-panthers-accept.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/wise-boxes-peel.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/accessibility-alt-text-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
if: ${{ github.event.issue || github.event.pull_request || github.event.discussion }}
steps:
- name: Get action 'github/accessibility-alt-text-bot'
uses: github/accessibility-alt-text-bot@v1.3.0
uses: github/accessibility-alt-text-bot@v1.4.0
101 changes: 76 additions & 25 deletions .github/workflows/assign_release_conductor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Assign Release Conductor

on:
pull_request:
workflow_dispatch:
inputs:
pull-request:
type: number
description: Pull Request Number
required: true

jobs:
assign-release-conductor:
Expand All @@ -13,39 +19,84 @@ jobs:
with:
node-version: 18
- run: npm ci
- name: Fetch user from pagerduty schedule
- uses: ./.github/actions/pagerduty
id: pagerduty
uses: actions/github-script@v5
with:
script: |
const fetch = require('node-fetch');
const today = new Date().toISOString().slice(0, 10) // format: 2022-11-24
const url = `https://api.pagerduty.com/schedules/P3IIVC4?since=${today}&until=${today}`
const response = await fetch(url, {
headers: {
'Content-Type': 'application/json',
'Authorization': 'Token token=${{ secrets.PAGERDUTY_API_KEY_SID }}'
}
})
const data = await response.json()
return data.schedule.final_schedule.rendered_schedule_entries[0].user.summary
- run: echo ${{ steps.pagerduty.outputs.result }} is release conductor

schedule-id: 'P3IIVC4'
token: ${{ secrets.PAGERDUTY_API_KEY_SID }}
- run: echo ${{ steps.pagerduty.outputs.user }} is release conductor
- name: Add user as assignee and reviewer
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ github.event.inputs.pull-request || github.event.pull_request.number }}
RELEASE_CONDUCTOR: ${{ steps.pagerduty.outputs.user }}
PREV_RELEASE_CONDUCTOR: ${{ steps.pagerduty.outputs.previous-schedule-user }}
with:
script: |
github.rest.issues.addAssignees({
issue_number: context.issue.number,
const { PR_NUMBER, RELEASE_CONDUCTOR, PREV_RELEASE_CONDUCTOR } = process.env;
const { data: pull } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
assignees: [${{ steps.pagerduty.outputs.result }}]
})
pull_number: PR_NUMBER,
});
// If the previous release conductor was added as an assignee, remove them
const hasPreviousAssignee = pull.assignees.find((assignee) => {
return assignee.login === PREV_RELEASE_CONDUCTOR;
});
if (hasPreviousAssignee) {
await github.rest.issues.removeAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: PR_NUMBER,
assignees: [PREV_RELEASE_CONDUCTOR],
});
}
github.rest.pulls.requestReviewers({
pull_number: context.issue.number,
// If the previous release conductor was added as a reviewer, remove them
const { data: requestedReviewers } = await github.rest.pulls.listRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
reviewers: [${{ steps.pagerduty.outputs.result }}]
})
pull_number: PR_NUMBER,
});
const hasPreviousReviewer = requestedReviewers.users.find((user) => {
return user.login === PREV_RELEASE_CONDUCTOR;
});
if (hasPreviousReviewer) {
await github.rest.pulls.removeRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: PR_NUMBER,
reviewers: [PREV_RELEASE_CONDUCTOR],
});
}
// Add the current release conductor as an assignee if they are not currently assigned
const hasAssignee = pull.assignees.find((assignee) => {
return assignee.login === RELEASE_CONDUCTOR;
});
if (!hasAssignee) {
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: PR_NUMBER,
assignees: [RELEASE_CONDUCTOR]
})
}
// Request the current release conductor as a reviewer if they are not currently requested
const hasReviewer = requestedReviewers.users.find((user) => {
return user.login === RELEASE_CONDUCTOR;
});
if (!hasReviewer) {
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: PR_NUMBER,
reviewers: [RELEASE_CONDUCTOR]
})
}
24 changes: 0 additions & 24 deletions .github/workflows/changesets.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/check_for_changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check for changeset

on:
pull_request:
types:
# On by default if you specify no types.
- 'opened'
- 'reopened'
- 'synchronize'
# For `skip-label` only.
- 'labeled'
- 'unlabeled'

jobs:
check-for-changeset:
name: Check for changeset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Check for changeset'
uses: brettcannon/check-for-changed-files@v1
with:
file-pattern: '.changeset/*.md'
skip-label: 'skip changeset'
failure-message: 'No changeset found. If these changes should not result in a new version, apply the ${skip-label} label to this pull request. If these changes should result in a version bump, please add a changeset https://git.io/J6QvQ'
26 changes: 0 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ jobs:
run: npm run lint:md

test:
strategy:
fail-fast: false
matrix:
react: [17, 18]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -69,30 +65,16 @@ jobs:
node-version: 18
cache: 'npm'

- name: Set React version
run: node script/set-react-version.js ${{ matrix.react }}

- name: Install dependencies
if: ${{ matrix.react == 17 }}
run: npm install --legacy-peer-deps

- name: Install dependencies
if: ${{ matrix.react == 18 }}
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm run test -- --coverage
env:
REACT_VERSION_17: ${{ matrix.react == 17 }}

type-check:
strategy:
fail-fast: false
matrix:
react: [17, 18]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -104,15 +86,7 @@ jobs:
node-version: 18
cache: 'npm'

- name: Set React version
run: node script/set-react-version.js ${{ matrix.react }}

- name: Install dependencies
if: ${{ matrix.react == 17 }}
run: npm install --legacy-peer-deps

- name: Install dependencies
if: ${{ matrix.react != 17 }}
run: npm ci

- name: Type check
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/release-notification.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .markdownlint-cli2.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ const githubMarkdownOpinions = require('@github/markdownlint-github')
// Rules we want to turn on but currently have too many violations
const rulesToEnforce = {
'fenced-code-language': false,
'no-duplicate-header': false, // Fix https://github.com/primer/doctocat/issues/527, then set this rule to `siblings_only: true`
// Fix https://github.com/primer/doctocat/issues/527, then set this rule to `siblings_only: true`
'no-duplicate-header': false,
// This currently conflicts with how prettier autoformats
'ul-style': false,
}
// Rules we don't care to enforce (usually stylistic)
const rulesToNotEnforce = {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# @primer/components

## 35.32.1

### Patch Changes

- [#3839](https://github.com/primer/react/pull/3839) [`d463d547`](https://github.com/primer/react/commit/d463d547f564d225786df7b702b735c0c7da6fd6) Thanks [@joshblack](https://github.com/joshblack)! - Restore Link underline preference to original behavior

- [#3836](https://github.com/primer/react/pull/3836) [`038a7899`](https://github.com/primer/react/commit/038a7899ccaa28f57bc5ececa5aed301bab3495d) Thanks [@xiaolou86](https://github.com/xiaolou86)! - docs: fix typo

## 35.32.0

### Minor Changes

- [#3720](https://github.com/primer/react/pull/3720) [`521b02f4`](https://github.com/primer/react/commit/521b02f4fa1fcba6375f3642e0cf1a9b01a4bda7) Thanks [@mperrotti](https://github.com/mperrotti)! - Updates link styles to support underline link preferences.

<!-- Changed components: ActionList, BranchName, Breadcrumbs, Button, Button2, Heading, Link -->

- [#3813](https://github.com/primer/react/pull/3813) [`1fcfc478`](https://github.com/primer/react/commit/1fcfc47885c5c152264d7402e243700f7d02ec31) Thanks [@joshblack](https://github.com/joshblack)! - Add support for a `ref` on the inner <button> in ToggleSwitch

### Patch Changes

- [#3815](https://github.com/primer/react/pull/3815) [`794a477c`](https://github.com/primer/react/commit/794a477c9065f37c5ab789e99cddaee010e6af4c) Thanks [@pksjce](https://github.com/pksjce)! - Update hover styles for ActionList item

- [#3691](https://github.com/primer/react/pull/3691) [`f4648b19`](https://github.com/primer/react/commit/f4648b19d664ba07d4a921bcafadd26f151093bd) Thanks [@joshblack](https://github.com/joshblack)! - Update ActionList to place `id` on item with an ARIA role

<!-- Changed components: ActionList -->

- [#3809](https://github.com/primer/react/pull/3809) [`6b18eaec`](https://github.com/primer/react/commit/6b18eaecbd99f81f92b2dd654b771c85b53f365b) Thanks [@gr2m](https://github.com/gr2m)! - export `SelectPanel` from `@primer/react/drafts`

<!-- Changed components: _none_ -->

- [#3683](https://github.com/primer/react/pull/3683) [`a84a1498`](https://github.com/primer/react/commit/a84a149826f658ddca715c4948d5a5002a648e4e) Thanks [@broccolinisoup](https://github.com/broccolinisoup)! - Button: Allow leadingIcon, trailingIcon, trailingAction to be overridable with sx

<!-- Changed components: Button -->

- [#3784](https://github.com/primer/react/pull/3784) [`6f4fe7d2`](https://github.com/primer/react/commit/6f4fe7d2a91786569f2f1492168268c58eca2b53) Thanks [@radglob](https://github.com/radglob)! - Revert "Add aria-selected value to ActionList.Item."

<!-- Changed components: ActionList -->

## 35.31.0

### Minor Changes
Expand Down
Loading

0 comments on commit f728472

Please sign in to comment.