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

chore(ai-help): use private repo for internal feedback #9506

Merged
merged 1 commit into from
Aug 17, 2023
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
3 changes: 3 additions & 0 deletions .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ jobs:
SENTRY_ENVIRONMENT: prod
SENTRY_RELEASE: ${{ github.sha }}

# AI Help.
REACT_APP_AI_FEEDBACK_GITHUB_REPO: mdn/ai-feedback

run: |

# Info about which CONTENT_* environment variables were set and to what.
Expand Down
3 changes: 3 additions & 0 deletions client/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export const GLEAN_ENABLED = Boolean(
JSON.parse(process.env.REACT_APP_GLEAN_ENABLED || "false")
);

export const AI_FEEDBACK_GITHUB_REPO =
process.env.REACT_APP_AI_FEEDBACK_GITHUB_REPO || "mdn/private-ai-feedback";

export function survey_duration(surveyBucket: string): {
start: number;
end: number;
Expand Down
3 changes: 2 additions & 1 deletion client/src/plus/ai-help/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { isExternalUrl } from "./utils";
import { useGleanClick } from "../../telemetry/glean-context";
import { AI_HELP } from "../../telemetry/constants";
import MDNModal from "../../ui/atoms/modal";
import { AI_FEEDBACK_GITHUB_REPO } from "../../env";

type Category = "apis" | "css" | "html" | "http" | "js" | "learn";

Expand Down Expand Up @@ -566,7 +567,7 @@ function ReportIssueOnGitHubLink({
const lastQuestion = questions.at(-1);

const url = new URL("https://github.com/");
url.pathname = "/mdn/ai-feedback/issues/new";
url.pathname = `/${AI_FEEDBACK_GITHUB_REPO}/issues/new`;

const sp = new URLSearchParams();
sp.set("title", `[AI Help] Question: ${lastQuestion}`);
Expand Down
6 changes: 6 additions & 0 deletions docs/envvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ automatically included in XHR calls on `http://localhost.org:3000`.
Note that even if you set this, you can still continue to use
`http://localhost:3000`.

### `REACT_APP_AI_FEEDBACK_GITHUB_REPO`

**Default: `mdn/private-ai-feedback`**

The GitHub repository to use for reporting issues with AI Help answers.

### `REACT_APP_BCD_BASE_URL`

**Default: `https://bcd.developer.allizom.org`**
Expand Down
Loading