Skip to content
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
2 changes: 2 additions & 0 deletions docs/en/guides/ai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Node.js 20 or later is required.
| Timesheet | View a week, log a day's hours, save or submit a week, estimate vs actual |
| Deal notes | List, add (next actions become tasks), update |
| Billing | Project invoices, invoice list (accounting), plan invoices, record invoiced and paid |
| Repositories | List linked repositories, import lockfiles and SBOMs now, import issues |

To import a lockfile or SBOM, just give the path of the file on the computer running the AI client ([supported formats](/guides/packages)).

Expand All @@ -99,3 +100,4 @@ So that an AI cannot delete data by mistake, **nothing can be deleted** through
- "Look at the current sprint's burndown and tell me whether we will finish"
- "Log 6 hours on the customer portal's API design and 1 hour of internal meetings for today"
- "List this month's overdue invoices"
- "Re-import the lockfiles from the stock API's repository"
4 changes: 4 additions & 0 deletions docs/en/guides/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ description: Issue an API token and have CI, such as GitHub Actions, import lock

Re-importing lockfiles by hand after every dependency update is tedious and easy to forget. Have CI send them instead, and Vectana always matches your repository.

:::tip
On GitHub or GitLab, [linking the repository](/guides/repositories) imports lockfiles and SBOMs on every push with no CI setup. Use this page when CI generates the SBOM or for other services.
:::

## Issue an API token

Tokens are issued on the project's "CI" tab. The tab is shown only to people who can manage the project (project owners, company admins, department heads and group admins).
Expand Down
2 changes: 1 addition & 1 deletion docs/en/guides/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export default defineMeta({
title: "Guides",
icon: "book-open",
order: 2,
pages: ["projects", "tasks", "timesheet", "sales", "billing", "packages", "ci", "ai", "vulnerabilities", "eol", "notifications"],
pages: ["projects", "tasks", "timesheet", "sales", "billing", "packages", "repositories", "ci", "ai", "vulnerabilities", "eol", "notifications"],
});
143 changes: 143 additions & 0 deletions docs/en/guides/repositories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
title: GitHub and GitLab
description: Link a repository to keep issues and tasks, and milestones and sprints, in step both ways, and import lockfiles and SBOMs on every push.
---

Link a GitHub or GitLab (gitlab.com or self-hosted) repository to a project and Vectana will:

- keep **issues and tasks** in step both ways (title, status, assignee, labels)
- pair **milestones and sprints**
- **complete** the tasks of issues a merged pull request (merge request) closes
- open an **issue for each security task** it creates automatically
- import the repository's lockfiles and SBOMs **on every push to the default branch and once a day**

![Repositories](/screenshots/en/project-repos.png)

## Link a repository [#link]

Open the project's **Repositories** tab and press **Link a repository**. The tab is shown to people who can manage the project (project owners, company administrators, department heads, group administrators).

| Field | Meaning |
| --- | --- |
| Service | GitHub or GitLab |
| Repository | `owner/name` on GitHub, `group/project` on GitLab (subgroups allowed) |
| GitHub Enterprise Server / self-hosted GitLab | Tick it and enter the URL: the API URL for GitHub Enterprise (`https://HOST/api/v3`), the server URL for GitLab (`https://HOST`) |
| Access token | A token with the permissions below |
| Sync issues and tasks | Off: only import lockfiles |
| Open issues for security tasks created automatically | On by default |
| Register the webhook automatically | On by default |
| Files to import | Empty: the whole repository. See [Files to import](#files) |

**Link** first checks that the token can read the repository. Lockfiles, open issues and milestones are then imported in the background.

### Token permissions [#token]

**GitHub**: a fine-grained personal access token (or a GitHub App token) with these permissions on the repository:

| Permission | For |
| --- | --- |
| Contents: Read | Importing lockfiles and SBOMs |
| Issues: Read and write | Syncing issues and milestones |
| Webhooks: Read and write | Registering the webhook (not needed if you add it by hand) |

**GitLab**: a project access token (or a group or personal token) with the `api` scope. Registering the webhook needs the Maintainer role or above.

Tokens are stored encrypted and never shown again. When one expires, enter a new one with **Change token**.

### Webhook [#webhook]

The webhook brings issue changes and pushes to Vectana right away. If the token may not register it, the URL and secret are shown on the link so you can add it by hand.

| Service | Where | Settings |
| --- | --- | --- |
| GitHub | Repository Settings → Webhooks | Content type `application/json`, Secret: the secret shown, events: Pushes, Issues, Milestones, Pull requests |
| GitLab | Project Settings → Webhooks | Secret token: the secret shown, triggers: push, issues and merge request events |

The webhook URL is built from Vectana's public URL ([`WEB_URL`](/self-hosting/configuration)), which GitHub or GitLab must be able to reach.

Without the webhook, the daily import and the **Import issues** button still catch up.

## Issues and tasks [#issues]

### Vectana → GitHub / GitLab

Tasks created after linking also become issues. Tasks that existed before do not, so linking does not flood the repository.

Changing a task's title, status, priority, kind, assignee or sprint updates its issue.

| Vectana | Issue |
| --- | --- |
| Title | Title (security tasks read "Update lodash to 4.17.21") |
| Status **Done** | Closed; otherwise open |
| Kind **Security** / **Other** | Labels `security` / `other` |
| Priority | Labels `priority: high` / `priority: medium` / `priority: low` |
| Assignee | Assignee (people who registered their [account name](#accounts)) |
| Sprint | Milestone |

The issue body holds the task's description and a link back to the task. Issues are written in the display language of the person who linked the repository. Other labels and assignees Vectana does not know stay on the issue.

Fields only Vectana has (estimated hours, points, due date, dependencies, progress) are not sent.

### GitHub / GitLab → Vectana

Creating or changing an issue updates its task:

- new issues become tasks (when **Sync issues and tasks** is on)
- title, open/closed, labels (kind and priority), assignee and milestone are applied
- assignees map to Vectana users by their registered [account names](#accounts). If only unknown accounts are assigned, the task's assignee is left alone

Tasks show the issue number as a link on the board, in lists and in the task dialog.

### Complete on merge [#merge]

Write `Closes #12`, `Fixes #12` or `Resolves #12` in a pull request's (merge request's) title or description. When it is merged, the task of issue #12 is completed.

## Milestones and sprints [#sprints]

A sprint created in Vectana creates a milestone of the same name (or uses an existing one with that name). Name, end date, goal and closing the sprint follow.

Milestones created on GitHub or GitLab become planned sprints. Close sprints in Vectana, since that freezes the points and returns unfinished tasks to the backlog.

## Issues for security tasks [#security]

When a [security task](/guides/tasks#security) is created automatically, an issue labeled `security` is opened. When every vulnerability is resolved and the task completes itself, the issue is closed.

To keep them out of the repository, turn off **Open issues for security tasks created automatically** on the link.

## Lockfiles and SBOMs [#files]

On every push to the default branch and once a day, the repository's lockfiles and SBOMs are imported as [packages](/guides/packages). **Import now** imports at any time.

- Supported formats are the same as for [uploading](/guides/packages). Nothing under `node_modules/` or `vendor/` is read
- The source is `git:REPOSITORY/PATH` (e.g. `git:acme/portal/web/package-lock.json`), so each file replaces its own packages
- Packages of files gone from the repository are removed. Packages that only moved to another file keep their triage and tasks
- Up to 50 files are read per import

To read only some files, list patterns in **Files to import**, one per line. `*` and `**` work.

```
web/package-lock.json
api/**
services/*/go.sum
```

[Uploading from CI](/guides/ci) still works. If you use both, pick one per file so it is not imported twice.

## Account names [#accounts]

Issue assignees map to Vectana users by the user names each person enters under **Personal settings → GitHub and GitLab accounts**. Case does not matter.

## Unlink [#unlink]

Unlink with the trash icon. A webhook Vectana registered is removed. Task–issue links and imported packages stay.

## Troubleshooting [#troubleshooting]

The last error is shown on the link.

| Message | What to do |
| --- | --- |
| Cannot read the repository: ... 401 | The token expired or was revoked. Use **Change token** |
| Cannot read the repository: ... 404 | Wrong repository name, or the token has no access to it |
| Webhook not registered | The token may not manage webhooks. [Add it by hand](#webhook) with the URL and secret shown |
| Last event does not change | The webhook is not arriving. Check its deliveries on GitHub or GitLab |
4 changes: 3 additions & 1 deletion docs/en/guides/tasks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ All work is tracked as tasks. The same task shows on the dashboard, the Gantt ch
| Security | Upgrading a package or runtime. Covers vulnerabilities and EOL together ([below](#security)) |
| Other | Reports, environment setup and the like |

A task has an assignee, start date, due date, status (to do, in progress, done), estimate in hours and a description. Only project members who are not viewers can be assigned. Members (except viewers) and managers can create and edit tasks; viewers can only read them.
A task has an assignee, start date, due date, status (to do, in progress, done), priority (high, medium, low), estimate in hours and a description. Only project members who are not viewers can be assigned. Members (except viewers) and managers can create and edit tasks; viewers can only read them.

Link a GitHub or GitLab repository to keep tasks and issues in step both ways; tasks then show their issue number as a link ([GitHub and GitLab](/guides/repositories)).

## Views [#views]

Expand Down
2 changes: 1 addition & 1 deletion docs/en/self-hosting/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Settings go in `.env`, next to `compose.yaml`. Apply changes with `docker compos
| `VECTANA_VERSION` | `latest` | The image tag. Pinning a version such as `1.0.0` is recommended |
| `POSTGRES_PASSWORD` | (required) | Database password |
| `SECRET_KEY` | (required) | Key that signs logins. Generate it with `openssl rand -hex 32`. Changing it logs everyone out |
| `WEB_URL` | `http://localhost:8000` | Public URL, used for links in invitation and notification emails |
| `WEB_URL` | `http://localhost:8000` | Public URL, used for links in invitation and notification emails and as the GitHub / GitLab webhook address |
| `GROUP_NAME` | `Vectana Group` | Group name shown in the app |

## Checks
Expand Down
2 changes: 2 additions & 0 deletions docs/guides/ai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Node.js 20 以上が必要です。
| 実績工数 | 週の工数の確認、1 日分の記録、週の保存・提出、見積と実績 |
| 商談メモ | 一覧、追加(次のアクションはタスクになります)、更新 |
| 請求 | プロジェクトの請求予定、請求一覧(経理)、請求予定の作成、請求済・入金済の記録 |
| リポジトリ連携 | 連携の一覧、lockfile・SBOM の今すぐ取り込み、Issue の取り込み |

lockfile や SBOM は、AI クライアントが動いているパソコン上のファイルパスを伝えればそのまま取り込めます([対応形式](/guides/packages))。

Expand All @@ -99,3 +100,4 @@ AI が誤ってデータを消さないよう、**削除の操作はできませ
- 「今のスプリントのバーンダウンを見て、終わりそうか教えて」
- 「今日は顧客ポータルの API 設計に 6 時間、社内会議に 1 時間で記録して」
- 「今月の入金遅れを一覧にして」
- 「在庫連携 API のリポジトリから lockfile を取り込み直して」
4 changes: 4 additions & 0 deletions docs/guides/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ description: API トークンを発行して、GitHub Actions などの CI か

依存関係を更新するたびに手で lockfile を取り込み直すのは手間がかかり、忘れがちです。CI から自動で送るようにしておくと、Vectana の情報がいつもリポジトリと同じ状態に保たれます。

:::tip
GitHub・GitLab を使っているなら、[リポジトリを連携](/guides/repositories)するだけで、push のたびに lockfile・SBOM を取り込めます。CI の設定は要りません。SBOM を CI で生成したい場合や、ほかのサービスを使っている場合は、このページの方法を使ってください。
:::

## API トークンを発行する

プロジェクトの「CI 連携」タブで発行します。このタブはプロジェクトを管理できる人(プロジェクトのオーナー、会社管理者、部署長、グループ管理者)にだけ表示されます。
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export default defineMeta({
title: "使い方",
icon: "book-open",
order: 2,
pages: ["projects", "tasks", "timesheet", "sales", "billing", "packages", "ci", "ai", "vulnerabilities", "eol", "notifications"],
pages: ["projects", "tasks", "timesheet", "sales", "billing", "packages", "repositories", "ci", "ai", "vulnerabilities", "eol", "notifications"],
});
Loading
Loading