2
.github/workflows/sync-audit-logs.yml
vendored
2
.github/workflows/sync-audit-logs.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
# need to use a token from a user with access to github/audit-log-allowlists for this step
|
||||
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
|
||||
run: |
|
||||
src/audit-logs/scripts/sync.js
|
||||
npm run audit-log-sync
|
||||
|
||||
- name: Get the audit-log-allowlists SHA being synced
|
||||
id: audit-log-allowlists
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 79 KiB |
@@ -44,10 +44,9 @@ The basic process behind using a codespace in your JetBrains IDE is as follows.
|
||||
|
||||
To work in a codespace in a JetBrains IDE you need:
|
||||
|
||||
- A valid JetBrains license
|
||||
- The JetBrains Gateway application
|
||||
- {% data variables.product.prodname_cli %} version 2.18.0 or later
|
||||
- An existing codespace that's running an SSH server. The codespace must have at least 4 cores.
|
||||
- A valid JetBrains license.
|
||||
- The JetBrains Gateway application, <!-- expires 2024-06-30 -->versions 2023.3.\* or 2024.1.\*.<!-- end expires 2024-06-30 -->
|
||||
- An existing codespace running on a virtual machine that has at least 4 cores. The codespace must also be running an SSH server. For more information, see "[Codespace running an SSH server](#codespace-running-an-ssh-server)."
|
||||
|
||||
### JetBrains license
|
||||
|
||||
@@ -59,21 +58,12 @@ You can install and update the JetBrains Gateway from the JetBrains Toolbox appl
|
||||
|
||||
1. Download and install the [JetBrains Toolbox](https://www.jetbrains.com/toolbox-app).
|
||||
1. Open the JetBrains Toolbox.
|
||||
1. Find **Gateway** in the list of available tools and click **Install**.
|
||||
1. Find **Gateway** in the list of available tools.
|
||||
|
||||

|
||||
|
||||
### {% data variables.product.prodname_cli %}
|
||||
|
||||
The {% data variables.product.prodname_github_codespaces %} plugin for the JetBrains Gateway requires that you have installed and configured {% data variables.product.prodname_cli %} version 2.18.0 or later before opening a codespace from the JetBrains Gateway.
|
||||
|
||||
Use this command to check your version of {% data variables.product.prodname_cli %}:
|
||||
|
||||
```shell copy
|
||||
gh --version
|
||||
```
|
||||
|
||||
For more information, see "[AUTOTITLE](/github-cli/github-cli/about-github-cli)."
|
||||
1. To the right of **Gateway**, click the ellipsis (**...**), then click **Available versions**.
|
||||
1. In the list of versions, beside a supported version (see "[Prerequisites](#prerequisites)"), click **Install**.
|
||||
|
||||
### Codespace running an SSH server
|
||||
|
||||
@@ -93,7 +83,8 @@ For more information about the `devcontainer.json` file and the default containe
|
||||
|
||||
The first time you use JetBrains Gateway for {% data variables.product.prodname_github_codespaces %}, you must install the {% data variables.product.prodname_codespaces %} plugin. You must also allow the JetBrains Gateway to access {% data variables.product.prodname_dotcom_the_website %} using your {% data variables.product.prodname_dotcom %} account.
|
||||
|
||||
1. Open the JetBrains Gateway application.
|
||||
1. Open the JetBrains Toolbox application.
|
||||
1. In the list of installed tools, click **Gateway**.
|
||||
1. Under **Install More Providers** click the **Install** link for {% data variables.product.prodname_github_codespaces %}.
|
||||
|
||||

|
||||
@@ -102,6 +93,10 @@ The first time you use JetBrains Gateway for {% data variables.product.prodname_
|
||||
|
||||

|
||||
|
||||
1. The first time you connect, you're prompted to choose whether you want to allow {% data variables.product.prodname_dotcom %} to collect anonymized usage data, to improve functionality and user experience. Click **Allow** or **Deny**.
|
||||
|
||||
You can change your choice later, if required, in the settings for the {% data variables.product.prodname_github_codespaces %} plugin, which you can access within the JetBrains Gateway settings.
|
||||
|
||||
1. In the "Welcome to JetBrains Gateway" dialog, click **Sign In with {% data variables.product.prodname_dotcom %}**.
|
||||
1. Click the icon beside the one-time code to copy it.
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{% note %}
|
||||
|
||||
**Note**: Using {% data variables.product.prodname_github_codespaces %} with JetBrains IDEs is currently in public beta and is subject to change.
|
||||
**Notes:**
|
||||
|
||||
- Using {% data variables.product.prodname_github_codespaces %} with JetBrains IDEs is currently in public beta and is subject to change.
|
||||
- To work on a codespace in a JetBrains IDE you must use <!-- expires 2024-06-30 -->release 2023.3.\* or 2024.1.\*<!-- end expires 2024-06-30 --> of the JetBrains Gateway.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -9,10 +9,6 @@ Alternatively, you can also open the JetBrains Gateway and select an existing co
|
||||
|
||||

|
||||
|
||||
1. The first time you connect, you're prompted to choose whether you want to allow {% data variables.product.prodname_dotcom %} to collect anonymized usage data, to improve functionality and user experience. Click **Allow** or **Deny**.
|
||||
|
||||
You can change your choice later, if required, in the settings for the {% data variables.product.prodname_github_codespaces %} plugin, which you can access within the JetBrains Gateway settings.
|
||||
|
||||
1. In the "Your Codespaces" list, click the codespace you want to work in.
|
||||
|
||||

|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"scripts": {
|
||||
"analyze-text": "node src/search/scripts/analyze-text.js",
|
||||
"archive-version": "node --max-old-space-size=8192 src/ghes-releases/scripts/archive-version.js",
|
||||
"audit-log-sync": "tsx src/audit-logs/scripts/sync.ts",
|
||||
"build": "next build",
|
||||
"check-content-type": "node src/workflows/check-content-type.js",
|
||||
"check-github-github-links": "node src/links/scripts/check-github-github-links.js",
|
||||
|
||||
@@ -34,13 +34,13 @@ A [workflow](.github/workflows/sync-audit-logs.yml) is used to trigger the autom
|
||||
|
||||
The workflow creates a pull request with audit log event updates and the label `audit-log-pipeline`. If there is no updated audit log data, a pull request is not created.
|
||||
|
||||
The workflow runs the `src/audit-logs/scripts/sync.js` script.
|
||||
The workflow runs the `src/audit-logs/scripts/sync.ts` script.
|
||||
|
||||
## Local development
|
||||
|
||||
To run the audit log events pipeline locally:
|
||||
|
||||
1. Run `src/audit-logs/scripts/sync.js`
|
||||
1. Run `npm run audit-log-sync`
|
||||
|
||||
## About this directory
|
||||
|
||||
@@ -48,7 +48,7 @@ To run the audit log events pipeline locally:
|
||||
- `src/audit-logs/lib` - The source code used in production to display the audit log event docs and configuration files edited by content and engineering team members.
|
||||
- `src/audit-logs/lib/config.json` - A configuration file used to specify metadata about the audit logs pipeline.
|
||||
- `src/audit-logs/scripts` - The scripts and source code used run the audit logs pipeline, which updates the `src/audit-logs/data` directory.
|
||||
- `src/audit-logs/scripts/sync.js` - The script that runs the audit-logs pipeline.
|
||||
- `src/audit-logs/scripts/sync.ts` - The script that runs the audit-logs pipeline.
|
||||
- `src/audit-logs/tests` - The tests used to verify the audit logs pipeline.
|
||||
|
||||
## Content team
|
||||
|
||||
@@ -15,12 +15,12 @@ import { mkdirp } from 'mkdirp'
|
||||
import path from 'path'
|
||||
|
||||
import { filterByAllowlistValues, filterAndUpdateGhesDataByAllowlistValues } from '../lib/index.js'
|
||||
import { getContents, getCommitSha } from '#src/workflows/git-utils.js'
|
||||
import { getContents, getCommitSha } from '@/workflows/git-utils.js'
|
||||
import {
|
||||
latest,
|
||||
latestStable,
|
||||
releaseCandidate,
|
||||
} from '#src/versions/lib/enterprise-server-releases.js'
|
||||
} from '@/versions/lib/enterprise-server-releases.js'
|
||||
|
||||
if (!process.env.GITHUB_TOKEN) {
|
||||
throw new Error('GITHUB_TOKEN environment variable must be set to run this script')
|
||||
@@ -34,6 +34,13 @@ const AUDIT_LOG_PAGES = {
|
||||
ENTERPRISE: 'enterprise',
|
||||
}
|
||||
|
||||
type AuditLogEventT = {
|
||||
action: string
|
||||
description: string
|
||||
}
|
||||
|
||||
type AuditLogdata = Record<string, Array<AuditLogEventT>>
|
||||
|
||||
async function main() {
|
||||
// get latest audit log data
|
||||
//
|
||||
@@ -75,14 +82,19 @@ async function main() {
|
||||
// data for every supported GHES version including RC releases. Just to be
|
||||
// extra careful, we also fallback to the latest stable GHES version if
|
||||
// there's an RC release in the docs site but no audit log data for that version.
|
||||
const auditLogData = {}
|
||||
const auditLogData: Record<string, AuditLogdata> = {}
|
||||
|
||||
// Wrapper around filterByAllowlistValues() because we always need all the
|
||||
// schema events and pipeline config data.
|
||||
const filter = (allowListValues, currentEvents = []) =>
|
||||
const filter = (allowListValues: string | string[], currentEvents: AuditLogEventT[] = []) =>
|
||||
filterByAllowlistValues(schemaEvents, allowListValues, currentEvents, pipelineConfig)
|
||||
// Wrapper around filterGhesByAllowlistValues() because we always need all the
|
||||
// schema events and pipeline config data.
|
||||
const filterAndUpdateGhes = (allowListValues, auditLogPage, currentEvents) =>
|
||||
const filterAndUpdateGhes = (
|
||||
allowListValues: string | string[],
|
||||
auditLogPage: string,
|
||||
currentEvents: AuditLogdata,
|
||||
) =>
|
||||
filterAndUpdateGhesDataByAllowlistValues(
|
||||
schemaEvents,
|
||||
allowListValues,
|
||||
Reference in New Issue
Block a user