Skip to content

Commit e03bada

Browse files
authored
Merge branch 'main' into repo-sync
2 parents ae17cae + 16cabec commit e03bada

52 files changed

Lines changed: 671 additions & 117 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/actions-scripts/enable-automerge.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { getOctokit } from '@actions/github'
22
const token = process.env.GITHUB_TOKEN
33
const prNumber = process.env.AUTOMERGE_PR_NUMBER
4+
const [org, repo] = process.env.GITHUB_REPOSITORY.split('/')
45
const github = getOctokit(token)
56

67
main()
78
async function main() {
8-
const pull = await github.pulls.get({
9-
...context.repo,
9+
const pull = await github.rest.pulls.get({
10+
owner: org,
11+
repo: repo,
1012
pull_number: parseInt(prNumber),
1113
})
1214

.github/workflows/autoupdate-branch.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Autoupdate branch
22

3-
# **What it does**: Any pull requests with "autoupdate" label will get main branch updates.
4-
# **Why we have it**: Our repo-sync automation relies on it.
5-
# **Who does it impact**: Our ability to support the open-source repository.
3+
# **What it does**: Any pull requests with automerge will get main branch updates.
4+
# **Why we have it**: So we don't have to watch pull requests and click update branch 100x.
5+
# **Who does it impact**: Our health.
66

77
#
88
# This workflow checks all open PRs targeting `main` as their base branch and
9-
# will attempt to update them if they have the `autoupdate` label applied.
9+
# will attempt to update them if they have automerge.
1010
# It is triggered when a `push` event occurs ON the `main` branch (e.g. a PR
1111
# was merged or a force-push was done).
1212
#
@@ -31,6 +31,5 @@ jobs:
3131
- uses: docker://chinthakagodawita/autoupdate-action:v1
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
34-
PR_FILTER: labelled
35-
PR_LABELS: autoupdate
34+
PR_FILTER: auto_merge
3635
MERGE_MSG: "Branch was updated using the 'autoupdate branch' Actions workflow."

.github/workflows/enterprise-dates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ jobs:
6464
"Hello! The GitHub Enterprise Server release dates have changed.\n\n
6565
If CI passes, this PR will be auto-merged. :green_heart:\n\n
6666
If CI does not pass or other problems arise, contact #docs-engineering on slack.\n\nThis PR was 🤖-crafted by `.github/workflows/enterprise-dates.yml`. 🧶"
67-
labels: autoupdate
6867
branch: enterprise-server-dates-update
6968
delete-branch: true
7069

7170
- name: Enable GitHub auto-merge
7271
if: ${{ steps.create-pull-request.outputs.pull-request-number }}
7372
env:
73+
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
7474
AUTOMERGE_PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
7575
run: node .github/actions-scripts/enable-automerge.js
7676

.github/workflows/repo-sync.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
destination_branch: main
127127
pr_title: 'repo sync'
128128
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
129-
pr_label: autoupdate,automated-reposync-pr
129+
pr_label: automated-reposync-pr
130130
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
131131

132132
- name: Find pull request
@@ -217,6 +217,7 @@ jobs:
217217
- name: Enable GitHub auto-merge
218218
if: ${{ steps.find-pull-request.outputs.number }}
219219
env:
220+
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
220221
AUTOMERGE_PR_NUMBER: ${{ steps.find-pull-request.outputs.number }}
221222
run: node .github/actions-scripts/enable-automerge.js
222223

.github/workflows/update-graphql-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ jobs:
5858
syncs up the GraphQL data in this repo.\n\n
5959
If CI passes, this PR will be auto-merged. :green_heart:\n\n
6060
If CI does not pass or other problems arise, contact #docs-engineering on slack."
61-
labels: autoupdate
6261
branch: graphql-schema-update
6362

6463
- name: Enable GitHub auto-merge
6564
if: ${{ steps.create-pull-request.outputs.pull-request-number }}
6665
env:
66+
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
6767
AUTOMERGE_PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
6868
run: node .github/actions-scripts/enable-automerge.js
6969

components/GenericError.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function GenericError() {
2020

2121
<div className="container-xl p-responsive py-9 width-full flex-1">
2222
<article className="col-md-10 col-lg-7 mx-auto">
23-
<h1 className="mb-3 pb-3 border-bottom">Ooops!</h1>
23+
<h1>Ooops!</h1>
2424
<Lead>It looks like something went wrong.</Lead>
2525
<p className="f3">
2626
We track these errors automatically, but if the problem persists please feel free to

components/Search.module.scss

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,47 @@
1+
/* TODO remove mark styling if https://github.com/primer/css/pull/1756 ships */
12
.resultsContainer mark {
23
background: none;
34
color: inherit;
45
}
56

6-
.searchResultContent {
7-
max-height: 4rem;
8-
}
9-
107
.searchResultContent mark {
118
color: var(--color-fg-default);
129
background-color: var(--color-attention-subtle);
1310
}
11+
/* end TODO */
1412

15-
.searchResultTitle em {
16-
font-style: normal;
17-
text-decoration: underline;
13+
.searchResultContent {
14+
max-height: 4rem;
1815
}
1916

2017
.resultsContainerHeader {
21-
display: none;
22-
position: absolute;
23-
top: 0;
24-
right: 0;
2518
width: 0;
26-
border-radius: 0 0 0 3px;
27-
background: var(--color-canvas-default);
28-
box-shadow: 0 1px 15px rgba(0, 0, 0, 0.15);
19+
border-radius: 0 0 0 4px; // primer rounded-1
2920
transition: width 0.3s ease-in-out;
30-
padding-top: 64px;
31-
}
32-
33-
.resultsContainerOpen {
34-
display: block;
3521
}
3622

3723
.resultsContainerOpen.resultsContainerHeader {
3824
width: 60vw;
39-
max-width: 760px;
25+
max-width: 48rem;
4026
}
4127

4228
.searchInput {
4329
transition: width 0.3s ease-in-out;
4430
}
4531

4632
.searchInputHeader {
47-
max-width: 690px;
48-
width: 256px;
49-
}
50-
51-
.searchInputExpanded {
52-
width: 53vw;
53-
position: absolute;
54-
right: 0;
55-
top: 0;
33+
width: 16rem;
5634
}
5735

5836
.headerSearchOpen {
5937
background: var(--color-primer-canvas-backdrop);
60-
position: fixed;
61-
top: 0;
62-
right: 0;
63-
bottom: 0;
64-
left: 0;
65-
display: block;
38+
}
39+
40+
.searchInputExpanded {
41+
width: 54vw;
42+
max-width: 43rem;
6643
}
6744

6845
.headerSearchResults {
69-
overflow-y: auto;
7046
max-height: 80vh;
7147
}

components/Search.tsx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ export function Search({
170170
id="search-results-container"
171171
className={cx(
172172
'z-1 pb-5 px-3',
173-
isHeaderSearch && 'pt-9',
173+
isHeaderSearch &&
174+
'pt-9 color-bg-default color-shadow-medium position-absolute top-0 right-0',
174175
styles.resultsContainer,
175176
isHeaderSearch && styles.resultsContainerHeader,
177+
query ? 'd-block' : 'd-none',
176178
query && styles.resultsContainerOpen
177179
)}
178180
>
@@ -189,7 +191,13 @@ export function Search({
189191
</div>
190192
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
191193
<div
192-
className={cx('-z-1', isHeaderSearch && query ? styles.headerSearchOpen : 'd-none')}
194+
className={cx(
195+
'-z-1',
196+
isHeaderSearch && query
197+
? 'position-fixed top-0 right-0 bottom-0 left-0 d-block'
198+
: 'd-none',
199+
isHeaderSearch && query && styles.headerSearchOpen
200+
)}
193201
onClick={closeSearch}
194202
/>
195203
</>
@@ -210,7 +218,8 @@ export function Search({
210218
variant === 'expanded' && 'py-3',
211219
isHeaderSearch && styles.searchInputHeader,
212220
!isHeaderSearch && 'width-full',
213-
isHeaderSearch && query && styles.searchInputExpanded
221+
isHeaderSearch && query && styles.searchInputExpanded,
222+
isHeaderSearch && query && 'position-absolute top-0 right-0'
214223
)}
215224
style={{
216225
background: `var(--color-canvas-default) url("/assets/images/octicons/search-${iconSize}.svg") no-repeat ${
@@ -325,7 +334,11 @@ function ShowSearchResults({
325334
const ActionListResults = (
326335
<div
327336
data-testid="search-results"
328-
className={cx('mt-3', isHeaderSearch && styles.headerSearchResults)}
337+
className={cx(
338+
'mt-3',
339+
isHeaderSearch && styles.headerSearchResults,
340+
isHeaderSearch && 'overflow-auto'
341+
)}
329342
>
330343
<div className="my-4">
331344
<p className="mx-4">
@@ -372,7 +385,7 @@ function ShowSearchResults({
372385
</small>
373386
)}
374387
<div
375-
className={cx(styles.searchResultTitle, 'mt-2 d-block f4 text-semibold')}
388+
className={cx('mt-2 d-block f4 text-semibold')}
376389
dangerouslySetInnerHTML={{
377390
__html: title,
378391
}}

components/landing/LandingHero.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export const LandingHero = () => {
2222

2323
return (
2424
<header className="d-lg-flex gutter-lg mb-6">
25-
<div className={cx(product_video && 'col-12 col-lg-6 mb-3 mb-lg-0')}>
26-
<h1 className="mb-3">
25+
<div className={cx('col-12 mb-3 mb-lg-0', product_video && 'col-lg-6')}>
26+
<h1>
2727
{shortTitle}{' '}
2828
{beta_product && <span className="Label Label--success v-align-middle">Beta</span>}
2929
</h1>

components/sublanding/SubLandingHero.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export const SubLandingHero = () => {
4343

4444
return (
4545
<div>
46-
<header className="d-flex gutter mb-6">
46+
<header className="d-flex gutter mb-6 my-4">
4747
<div className="col-12">
48-
<h1 className="my-3">{title} guides</h1>
48+
<h1>{title} guides</h1>
4949
{intro && <Lead data-search="lead">{intro}</Lead>}
5050
</div>
5151
</header>

0 commit comments

Comments
 (0)