Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.
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
24 changes: 24 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Setup Action'
description: 'Checks out the repo, sets up node, and installs dependencies'
runs:
using: 'composite'
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: '22'

- name: Cache dependencies
id: cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ./node_modules
key: modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
shell: bash
20 changes: 20 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
groups:
docusaurus:
patterns:
- '*docusaurus*'
ignore:
# Pin key docusaurus dependencies to major versions
- dependency-name: '@mdx-js/react'
update-types: ['version-update:semver-major']
- dependency-name: 'prism-react-renderer'
update-types: ['version-update:semver-major']
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
20 changes: 0 additions & 20 deletions .github/dependabot.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/_static-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Static checks

on:
workflow_call:

jobs:
lint:
name: Lint and format checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup
uses: ./.github/actions/setup

- name: Run ESLint
run: npm run eslint

- name: Run markdownlint
run: npm run markdownlint

- name: Run Prettier
run: npm run prettier

build:
name: Build site
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup
uses: ./.github/actions/setup

- name: Build site
run: npm run build
13 changes: 13 additions & 0 deletions .github/workflows/on-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: On PR

on:
pull_request:

permissions:
contents: read

jobs:
static-checks:
name: Static checks
uses: ./.github/workflows/_static-checks.yaml
secrets: inherit
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
5 changes: 5 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.{js,jsx,ts,tsx,mjs,cjs}": ["npx prettier --write", "npx eslint --fix"],
"*.md": ["npx prettier --write", "npx markdownlint-cli2 --fix"],
"*.css": ["npx prettier --write"]
}
35 changes: 35 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"heading-style": {
"style": "atx"
},
"ul-style": {
"style": "dash"
},
"line-length": {
"line_length": 80,
"code_blocks": false,
"tables": false
},
"hr-style": {
"style": "---"
},
"proper-names": {
"names": ["CodeGate", "Copilot", "GitHub"],
"code_blocks": false
},
"code-block-style": {
"style": "fenced"
},
"code-fence-style": {
"style": "backtick"
},
"emphasis-style": {
"style": "underscore"
},
"strong-style": {
"style": "asterisk"
},
"table-pipe-style": {
"style": "leading_and_trailing"
}
}
Empty file added .prettierignore
Empty file.
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"jsxSingleQuote": true,
"printWidth": 80,
"proseWrap": "always",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"unifiedjs.vscode-mdx",
"esbenp.prettier-vscode",
"davidanson.vscode-markdownlint"
]
}
27 changes: 27 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"mdx.validate.validateFileLinks": "warning",
"mdx.validate.validateFragmentLinks": "warning",
"mdx.validate.validateMarkdownFileLinkFragments": "warning",
"mdx.validate.validateReferences": "warning",
"mdx.validate.validateUnusedLinkDefinitions": "hint",
"prettier.configPath": ".prettierrc",
"prettier.requireConfig": true,
"yaml.format.proseWrap": "always",

"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[mdx]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
4 changes: 2 additions & 2 deletions docs/about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ sidebar_position: 20
---

- **UI port change** - 7 Jan, 2025\
The internal port for the dashboard UI has changed from 80 to 9090 to resolve a
permissions issue for Linux users.
The internal port for the dashboard UI has changed from 80 to 9090 to resolve
a permissions issue for Linux users.

- **Introducing CodeGate** - 17 Dec, 2024\
Initial public launch of CodeGate!
2 changes: 1 addition & 1 deletion docs/about/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ process outlined in the project's
## Creating GitHub issues

GitHub issues are used to track feature requests and bug reports. If you have a
general usage question, please ask in the #codegate channel on
general usage question, please ask in the `#codegate` channel on
[Discord](https://discord.gg/stacklok). To report a bug or request a feature,
create a new issue in the
[CodeGate GitHub repository](https://github.com/stacklok/codegate/issues).
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/use-with-continue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ option, best suited to quick experimentation with various coding models.
To use this provider, download your desired model file in GGUF format from the
[Hugging Face library](https://huggingface.co/models?library=gguf&sort=trending).
Then copy it into the `/app/codegate_volume/models` directory in the CodeGate
container. To persist models between restarts, run CodeGate with a Docker
volume as shown in the [recommended configuration](./install.md#recommended-settings).
container. To persist models between restarts, run CodeGate with a Docker volume
as shown in the [recommended configuration](./install.md#recommended-settings).

Example using huggingface-cli to download our recommended models for chat (at
least a 7B model is recommended for best results) and autocomplete (a 1.5B or 3B
Expand Down
3 changes: 2 additions & 1 deletion docs/partials/_remove-cert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Certificates in the CurrentUser\Root certificate store must be deleted from the
GUI.

1. In the Start menu, search for **Manage User Certificates** or run
(<kbd>Win</kbd>+<kbd>R</kbd>) `certmgr.msc` to open the user certificate store
(<kbd>Win</kbd>+<kbd>R</kbd>) `certmgr.msc` to open the user certificate
store
1. Navigate to **Trusted Root Certification Authorities** → **Certificates**
1. Delete the "CodeGate CA" certificate

Expand Down
2 changes: 0 additions & 2 deletions docs/quickstart-copilot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ id: quickstart
slug: /quickstart
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import useBaseUrl from '@docusaurus/useBaseUrl';
import ThemedImage from '@theme/ThemedImage';

Expand Down
10 changes: 5 additions & 5 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@ const config: Config = {
title: 'Links',
items: [
{
html: '<a href="https://www.stacklok.com" target="_blank" class="navbar__link header-stacklok-link"">&nbsp;&nbsp;Stacklok</a>'
html: '<a href="https://www.stacklok.com" target="_blank" class="navbar__link header-stacklok-link"">&nbsp;&nbsp;Stacklok</a>',
},
{
html: '<a href="https://youtube.com/@stacklok" target="_blank" class="navbar__link header-youtube-link"">&nbsp;&nbsp;YouTube</a>'
html: '<a href="https://youtube.com/@stacklok" target="_blank" class="navbar__link header-youtube-link"">&nbsp;&nbsp;YouTube</a>',
},
{
html: '<a href="https://github.com/stacklok/codegate" target="_blank" class="navbar__link header-github-link">&nbsp;&nbsp;GitHub</a>'
html: '<a href="https://github.com/stacklok/codegate" target="_blank" class="navbar__link header-github-link">&nbsp;&nbsp;GitHub</a>',
},
{
html: '<a href="https://discord.gg/stacklok" target="_blank" class="navbar__link header-discord-link">&nbsp;&nbsp;Discord</a>'
html: '<a href="https://discord.gg/stacklok" target="_blank" class="navbar__link header-discord-link">&nbsp;&nbsp;Discord</a>',
},
],
},
Expand Down Expand Up @@ -180,7 +180,7 @@ const config: Config = {
theme: { light: 'neutral', dark: 'dark' },
options: {
themeVariables: {
fontFamily: 'Figtree, system-ui, sans-serif'
fontFamily: 'Figtree, system-ui, sans-serif',
},
},
},
Expand Down
35 changes: 35 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
import eslintConfigPrettier from 'eslint-config-prettier';
import * as mdx from 'eslint-plugin-mdx';

/** @type {import('eslint').Linter.Config[]} */
export default [
{ ignores: ['.docusaurus/', 'build/', 'node_modules/'] },
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
eslintConfigPrettier,
{
...mdx.flat,
processor: mdx.createRemarkProcessor({
lintCodeBlocks: false,
languageMapper: {},
}),
rules: {
...mdx.flat.rules,
'react/no-unescaped-entities': 'off',
},
},
{
settings: {
react: {
version: 'detect',
},
},
},
];
Loading
Loading