Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo sync #34642

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
{% powershell %}

```powershell copy
Write-Output "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
Write-Output "::notice file=app.js,line=1,col=5,endColumn=7,title=YOUR-TITLE::Missing semicolon"
```

{% endpowershell %}
Expand All @@ -179,15 +179,15 @@
{% bash %}

```bash copy
echo "::warning file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
echo "::warning file=app.js,line=1,col=5,endColumn=7,title=YOUR-TITLE::Missing semicolon"
```

{% endbash %}

{% powershell %}

```powershell copy
Write-Output "::warning file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
Write-Output "::warning file=app.js,line=1,col=5,endColumn=7,title=YOUR-TITLE::Missing semicolon"
```

{% endpowershell %}
Expand All @@ -207,15 +207,15 @@
{% bash %}

```bash copy
echo "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
echo "::error file=app.js,line=1,col=5,endColumn=7,title=YOUR-TITLE::Missing semicolon"
```

{% endbash %}

{% powershell %}

```powershell copy
Write-Output "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
Write-Output "::error file=app.js,line=1,col=5,endColumn=7,title=YOUR-TITLE::Missing semicolon"
```

{% endpowershell %}
Expand Down Expand Up @@ -263,7 +263,7 @@

{% endpowershell %}

![Screenshot of the log for the workflow step. The second line, "My title", is prefaced by a downward arrow, indicating an expanded group. The next line, "Inside group", is indented below.](/assets/images/help/actions/actions-log-group.png)

Check warning on line 266 in content/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions.md

View workflow job for this annotation

GitHub Actions / lint-content

Images alternate text should be between 40-150 characters

Image alternate text is 186 characters long.

## Masking a value in a log

Expand Down
2 changes: 1 addition & 1 deletion src/github-apps/lib/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"2022-11-28"
]
},
"sha": "5a9222e9dba71d8c7d75d8e780cf091f16a9f5a7"
"sha": "dd9a41e53082d946d5732c803cab3f9be31c1332"
}
6 changes: 5 additions & 1 deletion src/pagelist/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@ router.get('/v1/:product@:version', (req: ExtendedRequest, res: Response) => {

// we filter the permalinks to get only our target version
const filteredPermalinks = keys.filter((key) => versionMatcher(key, `${product}@${version}`))
const expression = /^\/en/

if (!filteredPermalinks.length) {
res.status(400).type('text').send('Invalid version')
return
}

//right now we only need english permalinks perhaps we can use the language from the request in the future
const englishPermalinks = filteredPermalinks.filter((permalink) => expression.test(permalink))

defaultCacheControl(res)

// new line added at the end so `wc` works as expected with `-l` and `-w`.
res.type('text').send(filteredPermalinks.join('\n').concat('\n'))
res.type('text').send(englishPermalinks.join('\n').concat('\n'))
})

router.get('/:product@:version', (req, res) => {
Expand Down
10 changes: 10 additions & 0 deletions src/pagelist/tests/pagelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,14 @@ describe.each(allVersionKeys)('pagelist api for %s', async (versionKey) => {
expect(permalink).toMatch(expression)
})
})

test('only returns urls that contain /en', async () => {
const expression = new RegExp(`^/en(/${nonEnterpriseDefaultVersion})?/?.*`)
res.body
.trim()
.split('\n')
.forEach((permalink: string) => {
expect(permalink).toMatch(expression)
})
})
})
10 changes: 9 additions & 1 deletion src/rest/data/fpt-2022-11-28/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -154353,6 +154353,7 @@
"secret_scanning": "enabled",
"secret_scanning_push_protection": "enabled",
"secret_scanning_validity_checks": "enabled",
"secret_scanning_non_provider_patterns": "enabled",
"private_vulnerability_reporting": "enabled",
"enforcement": "enforced",
"url": "https://api.github.com/orgs/octo-org/code-security/configurations/17",
Expand All @@ -154377,6 +154378,7 @@
"secret_scanning": "enabled",
"secret_scanning_push_protection": "enabled",
"secret_scanning_validity_checks": "disabled",
"secret_scanning_non_provider_patterns": "disabled",
"private_vulnerability_reporting": "enabled",
"enforcement": "enforced",
"url": "https://api.github.com/orgs/octo-org/code-security/configurations/1326",
Expand Down Expand Up @@ -154808,6 +154810,7 @@
"secret_scanning": "enabled",
"secret_scanning_push_protection": "disabled",
"secret_scanning_validity_checks": "disabled",
"secret_scanning_non_provider_patterns": "disabled",
"private_vulnerability_reporting": "disabled",
"enforcement": "enforced",
"url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325",
Expand Down Expand Up @@ -155050,6 +155053,7 @@
"secret_scanning": "enabled",
"secret_scanning_push_protection": "enabled",
"secret_scanning_validity_checks": "enabled",
"secret_scanning_non_provider_patterns": "enabled",
"private_vulnerability_reporting": "enabled",
"enforcement": "enforced",
"url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325",
Expand Down Expand Up @@ -155441,6 +155445,7 @@
"secret_scanning": "enabled",
"secret_scanning_push_protection": "disabled",
"secret_scanning_validity_checks": "disabled",
"secret_scanning_non_provider_patterns": "disabled",
"private_vulnerability_reporting": "disabled",
"enforcement": "enforced",
"url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325",
Expand Down Expand Up @@ -155864,6 +155869,7 @@
"secret_scanning": "disabled",
"secret_scanning_push_protection": "disabled",
"secret_scanning_validity_checks": "disabled",
"secret_scanning_non_provider_patterns": "disabled",
"private_vulnerability_reporting": "disabled",
"enforcement": "enforced",
"url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325",
Expand Down Expand Up @@ -156314,6 +156320,7 @@
"secret_scanning": "enabled",
"secret_scanning_push_protection": "disabled",
"secret_scanning_validity_checks": "disabled",
"secret_scanning_non_provider_patterns": "disabled",
"private_vulnerability_reporting": "disabled",
"enforcement": "enforced",
"url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325",
Expand Down Expand Up @@ -157345,6 +157352,7 @@
"secret_scanning": "enabled",
"secret_scanning_push_protection": "disabled",
"secret_scanning_validity_checks": "disabled",
"secret_scanning_non_provider_patterns": "disabled",
"private_vulnerability_reporting": "disabled",
"enforcement": "enforced",
"url": "https://api.github.com/orgs/octo-org/code-security/configurations/1325",
Expand Down Expand Up @@ -349482,7 +349490,7 @@
}
],
"previews": [],
"descriptionHTML": "<div class=\"ghd-alert ghd-alert-attention\"><p class=\"ghd-alert-title\"><svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon mr-2\" aria-hidden><path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"></path></svg>Warning</p>\n<p>\n<strong>Deprecation notice:</strong> The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use <a href=\"https://docs.github.com/rest/code-security/configurations\">code security configurations</a> instead. For more information, see the <a href=\"https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/\">changelog</a>.</p>\n</div>\n<p>Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see \"<a href=\"https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization\">Managing security managers in your organization</a>.\"</p>\n<p>The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.</p>\n<p>OAuth app tokens and personal access tokens (classic) need the <code>write:org</code> scope to use this endpoint.</p>",
"descriptionHTML": "<div class=\"ghd-alert ghd-alert-attention\"><p class=\"ghd-alert-title\"><svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon mr-2\" aria-hidden><path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"></path></svg>Warning</p>\n<p>\n<strong>Deprecation notice:</strong> The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use <a href=\"https://docs.github.com/rest/code-security/configurations\">code security configurations</a> instead. For more information, see the <a href=\"https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/\">changelog</a>.</p>\n</div>\n<p>Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see \"<a href=\"https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization\">Managing security managers in your organization</a>.\"</p>\n<p>The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.</p>\n<p>OAuth app tokens and personal access tokens (classic) need the <code>admin:org</code>, <code>write:org</code>, or <code>repo</code> scopes to use this endpoint.</p>",
"statusCodes": [
{
"httpStatusCode": "204",
Expand Down
Loading
Loading