Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenalex836 authored Dec 18, 2024
2 parents 180b70c + 7221dab commit 225c347
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm ci && npm start",
"postCreateCommand": "npm ci",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
Expand Down
3 changes: 1 addition & 2 deletions config/moda/configuration/production/env.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
data:
MODA_APP_NAME: docs-internal
NODE_ENV: production
NODE_OPTIONS: '--max-old-space-size=4096'
PORT: '4000'
ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko'
HEROKU_APP_NAME: help-docs
HEROKU_PRODUCTION_APP: 'true'
RATE_LIMIT_MAX: '21'
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ With a {% data variables.product.prodname_copilot_enterprise %} license, you can
1. Once the suggested fix has been generated, at the bottom of the page, you can click **Create PR with fix** to automatically generate a pull request with the suggested fix.
A new branch is created from the default branch, the generated fix is committed and a draft pull request is created. You can test and edit the suggested fix as you would with any other fix.

For information about the limitations of automatically generated fixes, see "[Limitations of suggestions](/code-security/code-scanning/managing-code-scanning-alerts/about-autofix-for-codeql-code-scanning#limitations-of-suggestions)
You can also use the Autofix API for historical alerts endpoints to generate, get, and commit suggested fixes.

* [Create an autofix for a code scanning alert](/rest/code-scanning/code-scanning#create-an-autofix-for-a-code-scanning-alert)
* [Get the status of an autofix for a code scanning alert](/rest/code-scanning/code-scanning#get-the-status-of-an-autofix-for-a-code-scanning-alert)
* [Commit an autofix for a code scanning alert](/rest/code-scanning/code-scanning#commit-an-autofix-for-a-code-scanning-alert)

For information about the limitations of automatically generated fixes, see [Limitations of suggestions](/code-security/code-scanning/managing-code-scanning-alerts/about-autofix-for-codeql-code-scanning#limitations-of-suggestions).

{% endif %}

Expand Down
12 changes: 8 additions & 4 deletions src/observability/lib/statsd.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import StatsD from 'hot-shots'

const { HEROKU_APP_NAME, NODE_ENV, DD_API_KEY } = process.env
const { HEROKU_APP_NAME, NODE_ENV, DD_API_KEY, MODA_APP_NAME } = process.env
const mock = Boolean(NODE_ENV === 'test' || !DD_API_KEY)

export const tags = ['app:docs', HEROKU_APP_NAME ? `heroku_app:${HEROKU_APP_NAME}` : false].filter(
Boolean,
)
// MODA_APP_NAME gets set when the deploy target is Moda
const modaApp = MODA_APP_NAME ? `moda_app_name:${MODA_APP_NAME}` : false
// HEROKU_APP_NAME gets set when the deploy target is Azure
const herokuApp = HEROKU_APP_NAME ? `heroku_app:${HEROKU_APP_NAME}` : false

export const tags = ['app:docs', modaApp, herokuApp].filter(Boolean)

/**
* @type {import('hot-shots').StatsD}
*/
Expand Down

0 comments on commit 225c347

Please sign in to comment.