Skip to content

Commit

Permalink
Merge pull request #24731 from github/repo-sync
Browse files Browse the repository at this point in the history
repo sync
  • Loading branch information
Octomerger authored Mar 28, 2023
2 parents 7dcce99 + bc95bb4 commit 1002409
Show file tree
Hide file tree
Showing 15 changed files with 354 additions and 99 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
{ name: 'graphql', path: 'tests/graphql', },
{ name: 'events', path: 'src/events/tests', },
{ name: 'automated-pipelines', path: 'src/automated-pipelines/tests', },
{ name: 'rest', path: 'src/rest/tests', },
{ name: 'webhooks', path: 'src/webhooks/tests', },
{ name: 'linting', path: 'tests/linting', },
{ name: 'meta', path: 'tests/meta', },
{ name: 'routing', path: 'tests/routing', },
Expand Down
30 changes: 30 additions & 0 deletions data/graphql/ghae/schema.docs-ghae.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,11 @@ input AddPullRequestReviewThreadInput {
The side of the diff on which the start line resides.
"""
startSide: DiffSide = RIGHT

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType = LINE
}

"""
Expand Down Expand Up @@ -27909,6 +27914,11 @@ type PullRequestReviewComment implements Comment & Deletable & Minimizable & Nod
"""
state: PullRequestReviewCommentState!

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType!

"""
Identifies when the comment was last updated.
"""
Expand Down Expand Up @@ -28285,6 +28295,11 @@ type PullRequestReviewThread implements Node {
"""
startLine: Int

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType!

"""
Indicates whether the current viewer can reply to this thread.
"""
Expand Down Expand Up @@ -28341,6 +28356,21 @@ type PullRequestReviewThreadEdge {
node: PullRequestReviewThread
}

"""
The possible subject types of a pull request review comment.
"""
enum PullRequestReviewThreadSubjectType {
"""
A comment that has been made against the file of a pull request
"""
FILE

"""
A comment that has been made against the line of a pull request
"""
LINE
}

"""
Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits.
"""
Expand Down
30 changes: 30 additions & 0 deletions data/graphql/ghec/schema.docs.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,11 @@ input AddPullRequestReviewThreadInput {
The side of the diff on which the start line resides.
"""
startSide: DiffSide = RIGHT

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType = LINE
}

"""
Expand Down Expand Up @@ -34239,6 +34244,11 @@ type PullRequestReviewComment implements Comment & Deletable & Minimizable & Nod
"""
state: PullRequestReviewCommentState!

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType!

"""
Identifies when the comment was last updated.
"""
Expand Down Expand Up @@ -34615,6 +34625,11 @@ type PullRequestReviewThread implements Node {
"""
startLine: Int

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType!

"""
Indicates whether the current viewer can reply to this thread.
"""
Expand Down Expand Up @@ -34671,6 +34686,21 @@ type PullRequestReviewThreadEdge {
node: PullRequestReviewThread
}

"""
The possible subject types of a pull request review comment.
"""
enum PullRequestReviewThreadSubjectType {
"""
A comment that has been made against the file of a pull request
"""
FILE

"""
A comment that has been made against the line of a pull request
"""
LINE
}

"""
Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits.
"""
Expand Down
30 changes: 30 additions & 0 deletions data/graphql/schema.docs.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,11 @@ input AddPullRequestReviewThreadInput {
The side of the diff on which the start line resides.
"""
startSide: DiffSide = RIGHT

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType = LINE
}

"""
Expand Down Expand Up @@ -34239,6 +34244,11 @@ type PullRequestReviewComment implements Comment & Deletable & Minimizable & Nod
"""
state: PullRequestReviewCommentState!

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType!

"""
Identifies when the comment was last updated.
"""
Expand Down Expand Up @@ -34615,6 +34625,11 @@ type PullRequestReviewThread implements Node {
"""
startLine: Int

"""
The level at which the comments in the corresponding thread are targeted, can be a diff line or a file
"""
subjectType: PullRequestReviewThreadSubjectType!

"""
Indicates whether the current viewer can reply to this thread.
"""
Expand Down Expand Up @@ -34671,6 +34686,21 @@ type PullRequestReviewThreadEdge {
node: PullRequestReviewThread
}

"""
The possible subject types of a pull request review comment.
"""
enum PullRequestReviewThreadSubjectType {
"""
A comment that has been made against the file of a pull request
"""
FILE

"""
A comment that has been made against the line of a pull request
"""
LINE
}

"""
Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits.
"""
Expand Down
4 changes: 4 additions & 0 deletions lib/enterprise-dates.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,9 @@
"3.11": {
"releaseDate": "2023-10-31",
"deprecationDate": "2024-11-28"
},
"3.12": {
"releaseDate": "2024-02-06",
"deprecationDate": "2025-02-27"
}
}
63 changes: 63 additions & 0 deletions src/automated-pipelines/tests/accessibility.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { jest, test } from '@jest/globals'

import { getDOM } from '../../../tests/helpers/e2etest.js'

describe('automated page heading accessibility', () => {
jest.setTimeout(3 * 60 * 1000)

test('rest pages do not render any headings with duplicate text', async () => {
const $ = await getDOM('/en/rest/actions/artifacts')
const headingText = $('body')
.find('h2, h3, h4, h5, h6')
.map((i, el) => $(el).text())
.get()
.sort()

const dupes = headingText.filter((item, index) => headingText.indexOf(item) !== index)

const message = `The following duplicate heading texts were found: ${dupes.join(', ')}`
expect(dupes.length, message).toBe(0)
})

test('rest pages do not render any headings with duplicate ids', async () => {
const $ = await getDOM('/en/rest/actions/artifacts')
const headingIDs = $('body')
.find('h2, h3, h4, h5, h6')
.map((i, el) => $(el).attr('id'))
.get()
.sort()

const dupes = headingIDs.filter((item, index) => headingIDs.indexOf(item) !== index)

const message = `The following duplicate heading IDs were found: ${dupes.join(', ')}`
expect(dupes.length, message).toBe(0)
})

test('webhook pages do not render any headings with duplicate text', async () => {
const $ = await getDOM('/en/webhooks-and-events/webhooks/webhook-events-and-payloads')
const headingText = $('body')
.find('h2, h3, h4, h5, h6')
.map((i, el) => $(el).text())
.get()
.sort()

const dupes = headingText.filter((item, index) => headingText.indexOf(item) !== index)

const message = `The following duplicate heading texts were found: ${dupes.join(', ')}`
expect(dupes.length, message).toBe(0)
})

test('webhook pages do not render any headings with duplicate ids', async () => {
const $ = await getDOM('/en/webhooks-and-events/webhooks/webhook-events-and-payloads')
const headingIDs = $('body')
.find('h2, h3, h4, h5, h6')
.map((i, el) => $(el).attr('id'))
.get()
.sort()

const dupes = headingIDs.filter((item, index) => headingIDs.indexOf(item) !== index)

const message = `The following duplicate heading IDs were found: ${dupes.join(', ')}`
expect(dupes.length, message).toBe(0)
})
})
16 changes: 16 additions & 0 deletions src/graphql/data/dotcom/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
[
{
"schemaChanges": [
{
"title": "The GraphQL schema includes these changes:",
"changes": [
"<p>Type <code>PullRequestReviewThreadSubjectType</code> was added</p>",
"<p>Input field <code>subjectType</code> was added to input object type <code>AddPullRequestReviewThreadInput</code></p>",
"<p>Field <code>subjectType</code> was added to object type <code>PullRequestReviewComment</code></p>",
"<p>Field <code>subjectType</code> was added to object type <code>PullRequestReviewThread</code></p>"
]
}
],
"previewChanges": [],
"upcomingChanges": [],
"date": "2023-03-28"
},
{
"schemaChanges": [
{
Expand Down
41 changes: 41 additions & 0 deletions src/graphql/data/dotcom/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48552,6 +48552,14 @@
"kind": "enums",
"href": "/graphql/reference/enums#pullrequestreviewcommentstate"
},
{
"name": "subjectType",
"description": "<p>The level at which the comments in the corresponding thread are targeted, can be a diff line or a file.</p>",
"type": "PullRequestReviewThreadSubjectType!",
"id": "pullrequestreviewthreadsubjecttype",
"kind": "enums",
"href": "/graphql/reference/enums#pullrequestreviewthreadsubjecttype"
},
{
"name": "updatedAt",
"description": "<p>Identifies when the comment was last updated.</p>",
Expand Down Expand Up @@ -49055,6 +49063,14 @@
"kind": "scalars",
"href": "/graphql/reference/scalars#int"
},
{
"name": "subjectType",
"description": "<p>The level at which the comments in the corresponding thread are targeted, can be a diff line or a file.</p>",
"type": "PullRequestReviewThreadSubjectType!",
"id": "pullrequestreviewthreadsubjecttype",
"kind": "enums",
"href": "/graphql/reference/enums#pullrequestreviewthreadsubjecttype"
},
{
"name": "viewerCanReply",
"description": "<p>Indicates whether the current viewer can reply to this thread.</p>",
Expand Down Expand Up @@ -78463,6 +78479,23 @@
}
]
},
{
"name": "PullRequestReviewThreadSubjectType",
"kind": "enums",
"id": "pullrequestreviewthreadsubjecttype",
"href": "/graphql/reference/enums#pullrequestreviewthreadsubjecttype",
"description": "<p>The possible subject types of a pull request review comment.</p>",
"values": [
{
"name": "FILE",
"description": "<p>A comment that has been made against the file of a pull request.</p>"
},
{
"name": "LINE",
"description": "<p>A comment that has been made against the line of a pull request.</p>"
}
]
},
{
"name": "PullRequestState",
"kind": "enums",
Expand Down Expand Up @@ -83834,6 +83867,14 @@
"id": "diffside",
"kind": "enums",
"href": "/graphql/reference/enums#diffside"
},
{
"name": "subjectType",
"description": "<p>The level at which the comments in the corresponding thread are targeted, can be a diff line or a file.</p>",
"type": "PullRequestReviewThreadSubjectType",
"id": "pullrequestreviewthreadsubjecttype",
"kind": "enums",
"href": "/graphql/reference/enums#pullrequestreviewthreadsubjecttype"
}
]
},
Expand Down
Loading

0 comments on commit 1002409

Please sign in to comment.