Skip to content

Commit 2b31096

Browse files
authored
Merge branch 'main' into remove-fpt
2 parents 927ead1 + 8f47b9d commit 2b31096

4 files changed

Lines changed: 18 additions & 6 deletions

File tree

content/developers/apps/scopes-for-oauth-apps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Name | Description
4646
 `repo_deployment`| Grants access to [deployment statuses](/rest/reference/repos#deployments) for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, *without* granting access to the code.
4747
 `public_repo`| Limits access to public repositories. That includes read/write access to code, commit statuses, repository projects, collaborators, and deployment statuses for public repositories and organizations. Also required for starring public repositories.
4848
 `repo:invite` | Grants accept/decline abilities for invitations to collaborate on a repository. This scope is only necessary to grant other users or services access to invites *without* granting access to the code.{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}
49-
&emsp;`security_events` | Grants: <br/> read and write access to security events in the [{% data variables.product.prodname_code_scanning %} API](/rest/reference/code-scanning). <br/> read and write access to security events in the [{% data variables.product.prodname_secret_scanning %} API](/rest/reference/secret-scanning).{% endif %}{% if currentVersion ver_gt "enterprise-server@2.21" and currentVersion ver_lt "enterprise-server@3.1" %}
50-
&emsp;`security_events` | Grants read and write access to security events in the [{% data variables.product.prodname_code_scanning %} API](/rest/reference/code-scanning).{% endif %}
49+
&emsp;`security_events` | Grants: <br/> read and write access to security events in the [{% data variables.product.prodname_code_scanning %} API](/rest/reference/code-scanning) <br/> read and write access to security events in the [{% data variables.product.prodname_secret_scanning %} API](/rest/reference/secret-scanning) <br/> This scope is only necessary to grant other users or services access to security events *without* granting access to the code.{% endif %}{% if currentVersion ver_gt "enterprise-server@2.21" and currentVersion ver_lt "enterprise-server@3.1" %}
50+
&emsp;`security_events` | Grants read and write access to security events in the [{% data variables.product.prodname_code_scanning %} API](/rest/reference/code-scanning). This scope is only necessary to grant other users or services access to security events *without* granting access to the code.{% endif %}
5151
**`admin:repo_hook`** | Grants read, write, ping, and delete access to repository hooks in public and private repositories. The `repo` and `public_repo` scopes grants full access to repositories, including repository hooks. Use the `admin:repo_hook` scope to limit access to only repository hooks.
5252
&emsp;`write:repo_hook` | Grants read, write, and ping access to hooks in public or private repositories.
5353
&emsp;`read:repo_hook`| Grants read and ping access to hooks in public or private repositories.

lib/warm-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const loadSiteTree = require('./site-tree')
77
// Instrument these functions so that
88
// it's wrapped in a timer that reports to Datadog
99
const dog = {
10-
loadPages: statsd.timer(loadPages, 'load_pages'),
11-
loadPageMap: statsd.timer(loadPageMap, 'load_page_map'),
10+
loadPages: statsd.asyncTimer(loadPages, 'load_pages'),
11+
loadPageMap: statsd.asyncTimer(loadPageMap, 'load_page_map'),
1212
loadRedirects: statsd.timer(loadRedirects, 'load_redirects'),
1313
loadSiteData: statsd.timer(loadSiteData, 'load_site_data'),
1414
loadSiteTree: statsd.asyncTimer(loadSiteTree, 'load_site_tree')

middleware/csp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ module.exports = async (req, res, next) => {
5656

5757
// Exception for Algolia instantsearch in deprecated Enterprise docs (Node.js era)
5858
if (versionSatisfiesRange(requestedVersion, '<=2.19') && versionSatisfiesRange(requestedVersion, '>2.12')) {
59-
csp.directives.scriptSrc.push("'unsafe-eval'")
59+
csp.directives.scriptSrc.push("'unsafe-eval'", "'unsafe-inline'", 'http://www.google-analytics.com', 'https://ssl.google-analytics.com')
60+
csp.directives.connectSrc.push('https://www.google-analytics.com')
61+
csp.directives.imgSrc.push('http://www.google-analytics.com', 'https://ssl.google-analytics.com')
6062
}
6163

6264
// Exception for search in deprecated Enterprise docs <=2.12 (static site era)

tests/routing/deprecated-enterprise-versions.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ describe('JS and CSS assets', () => {
169169
expect(result.get('Content-Type')).toBe('image/svg+xml; charset=utf-8')
170170
})
171171

172+
it('returns the expected node_modules', async () => {
173+
const result = await supertest(app)
174+
.get('/node_modules/algoliasearch/dist/algoliasearch.min.js')
175+
.set('Referrer', '/en/enterprise/2.17')
176+
177+
expect(result.statusCode).toBe(200)
178+
expect(result.get('x-is-archived')).toBe('true')
179+
expect(result.get('Content-Type')).toBe('application/javascript; charset=utf-8')
180+
})
181+
172182
it('returns the expected favicon', async () => {
173183
const result = await supertest(app)
174184
.get('/assets/images/site/favicon.svg')
@@ -179,7 +189,7 @@ describe('JS and CSS assets', () => {
179189
expect(result.get('Content-Type')).toBe('image/svg+xml; charset=utf-8')
180190
})
181191

182-
it('returns the expected CSS file ( <2.13 )', async () => {
192+
it('returns the expected CSS file ( <2.13 )', async () => {
183193
const result = await supertest(app)
184194
.get('/assets/stylesheets/application.css')
185195
.set('Referrer', '/en/enterprise/2.12')

0 commit comments

Comments
 (0)