ファクトの型
このページは、エンジンのバージョン 0.16.0 のコードから生成しています。リリースとリリースの間は main のコードを表示するため、次のバージョンの変更がすでに入っていることがあります。
ファクトとは、Pointsman 自身が調べるデータです。たとえば、ある場所が浸水想定区域に入るか、プルリクエストが変更したファイルの数などです。ファクトを AI が推測することはありません。プロファイルでは、このページの型を指定してファクトを定義し、ルールからその型のフィールドを読みます。
コードから取り込んだ説明文は英語のままです。
表の「意味」の列では、プロファイルでファクトに付けた名前を name と書いています。
共通のファクト型
Section titled “共通のファクト型”共通のファクト型(ケイパビリティ)はエンジンが定義します。答えるのはモジュールで、自分のレイヤーにだけ答えるモジュールもあります。
inside
Section titled “inside”Inside an area of a layer.
答えるモジュール: @pointsman/facts-gsi(レイヤー gsi-flood-max)
| フィールド | 種類 | 意味 |
|---|---|---|
inside | はい・いいえ | true のとき: 場所がnameの範囲内 |
rank | 数値 | nameのランク |
class | 文字列 | nameの区分 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
layer | string | はい | Layer id for inside and nearest, configured per deployment (source, licence, attribution). |
at の位置に値がないときは no_location(リクエストに位置がない)として欠けます。3 秒で調べるのをやめます。
nearest
Section titled “nearest”The nearest feature of a layer.
答えるモジュール: @pointsman/facts-gsi(レイヤー gsi-shelters-flood)
| フィールド | 種類 | 意味 |
|---|---|---|
found | はい・いいえ | true のとき: 最寄りのnameが見つかった |
distance_m | 数値 | 最寄りのnameまでの距離 (m) |
name | 文字列 | 最寄りのnameの名前 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
layer | string | はい | Layer id for inside and nearest, configured per deployment (source, licence, attribution). |
at の位置に値がないときは no_location(リクエストに位置がない)として欠けます。3 秒で調べるのをやめます。
detour
Section titled “detour”Extra metres around a closed section (needs a LineString).
答えるモジュール: @pointsman/facts-valhalla
| フィールド | 種類 | 意味 |
|---|---|---|
possible | はい・いいえ | true のとき: 迂回路(name)がある |
extra_m | 数値 | 迂回路(name)で遠回りになる距離 (m) |
route | 文字列 | 人と地図のための値です。ルールでは使えません。 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
mode | “drive” | “walk” | いいえ | For detour: by car (drive, the default) or on foot (walk). |
route | boolean | いいえ | For detour: also return the way around (route, an encoded polyline). Default false: the route starts and ends at the section, so it is stored with each decision. |
at の位置に値がないときは no_location(リクエストに位置がない)として欠けます。8 秒で調べるのをやめます。
@pointsman/github
Section titled “@pointsman/github”モジュール @pointsman/github のファクト型です。このモジュールが読むデプロイの設定: FACTS_GITHUB, FACTS_GITHUB_TOKEN, FACTS_GITHUB_APP_ID, FACTS_GITHUB_APP_PRIVATE_KEY, FACTS_GITHUB_IGNORE_CHECK
github_pr
Section titled “github_pr”A pull request.
| フィールド | 種類 | 意味 |
|---|---|---|
open | はい・いいえ | true のとき: プルリクエストnameがオープン |
merged | はい・いいえ | true のとき: プルリクエストnameがマージ済み |
draft | はい・いいえ | true のとき: プルリクエストnameがドラフト |
wip_title | はい・いいえ | true のとき: nameのタイトルに WIP とある |
files | 数値 | nameの変更ファイル数 |
changed_lines | 数値 | nameの変更行数 |
base_is_default | はい・いいえ | true のとき: nameがデフォルトブランチ向け |
author_member | はい・いいえ | true のとき: nameの作成者がオーナーのメンバー |
author_dependabot | はい・いいえ | true のとき: nameが Dependabot によるもの |
fork | はい・いいえ | true のとき: nameがフォークから |
all_commits_verified | はい・いいえ | true のとき: nameのすべてのコミットに検証済みの署名がある |
pushed_by_author | 文字列 | 「nameのすべてのコミットを作成者が push したか」の答え |
author_sole_code_owner | はい・いいえ | true のとき: nameの作成者が変更ファイルすべての唯一のコードオーナー |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
github_paths
Section titled “github_paths”Changed files that match paths.
| フィールド | 種類 | 意味 |
|---|---|---|
any | はい・いいえ | true のとき: nameに合う変更ファイルがある |
all | はい・いいえ | true のとき: すべての変更ファイルがnameに合う |
count | 数値 | nameに合う変更ファイルの数 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
paths | string[] | はい | For github_paths: the files that count, as globs from the top of the repository (*, ** and ? only), for example docs/**. |
except | string[] | いいえ | For github_paths: files that never count, even when they match paths. |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
github_checks
Section titled “github_checks”Required checks on the head commit.
| フィールド | 種類 | 意味 |
|---|---|---|
required | 数値 | 必須チェック(name)の数 |
green | はい・いいえ | true のとき: 必須チェック(name)がすべて通った |
pending | はい・いいえ | true のとき: 必須チェック(name)に終わっていないものがある |
failed | はい・いいえ | true のとき: 必須チェック(name)に失敗したものがある |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
github_property
Section titled “github_property”A repository custom property.
| フィールド | 種類 | 意味 |
|---|---|---|
value | 文字列 | nameの値 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
property | string | はい | For github_property: the name of a repository custom property. |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
github_workflows
Section titled “github_workflows”The GitHub Actions files it changes.
| フィールド | 種類 | 意味 |
|---|---|---|
changed | 数値 | nameで変わったファイル(ワークフロー、ローカルアクション、スキャナーの設定)の数 |
removed | 数値 | nameで消えたファイル(ワークフロー、ローカルアクション、スキャナーの設定)の数 |
unparsed | 数値 | nameで安全に読めないワークフローと action.yml の数 |
bytes | 数値 | nameで変わったファイルの大きさ(バイト) |
privileged | 数値 | nameで変わった、ベースリポジトリのトークンで動くワークフローの数 |
privileged_new | 数値 | nameが加えるそのようなトリガーの数 |
head_checkout | 数値 | nameで別のコードをチェックアウトしうる特権ジョブの数 |
pwn_request | 数値 | nameでチェックアウトしたコードを実行しうる特権ジョブの数 |
artifact_in_privileged | 数値 | nameで別の実行のアーティファクトを取り込む特権ジョブの数 |
remote_reusable | 数値 | nameで特権ワークフローから別リポジトリの再利用ワークフローを呼ぶか、すべてのシークレットを渡すジョブの数 |
secrets_new | 数値 | nameでジョブが新しく読むシークレットの数 |
injection | 数値 | nameのスクリプト内の信頼できない式の数 |
permissions_missing | 数値 | nameで permissions のないジョブの数 |
write_all | 数値 | nameの広い書き込み権限の数 |
write_new | 数値 | nameが加える書き込み権限の数 |
persisted | 数値 | nameでトークンをディスクに残すチェックアウトの数 |
unpinned | 数値 | nameでコミットやダイジェストに固定されていないアクションとイメージの数 |
suppressions_new | 数値 | nameが加えるスキャナーの例外の数 |
local_unresolved | 数値 | nameで人が読む必要のあるローカルアクションと再利用ワークフローの数 |
detail | 文字列 | 人と地図のための値です。ルールでは使えません。 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
privileged_triggers | string[] | いいえ | For github_workflows: more triggers that run in the base repository’s context, added to the defaults. |
inert_actions | string[] | いいえ | For github_workflows: more actions (owner/repo or owner/*) known not to run workspace content, added to the defaults (actions/checkout, actions/upload-artifact). |
safe_contexts | string[] | いいえ | For github_workflows: more github.* paths that are safe in a script (numbers, ids, commit ids), added to the defaults. Exact paths in lower case. |
base_refs | string[] | いいえ | For github_workflows: more expressions that name the base in a checkout’s ref, added to the defaults (github.sha, github.ref). |
git_actions | string[] | いいえ | For github_workflows: actions (owner/repo or owner/*) that need the git credentials of a checkout. |
pin_exempt | string[] | いいえ | For github_workflows: actions (owner/repo or owner/*) that need not be pinned to a commit. |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
github_copilot
Section titled “github_copilot”Copilot code review on the pull request.
| フィールド | 種類 | 意味 |
|---|---|---|
requested | はい・いいえ | true のとき: nameの Copilot レビューが依頼されている |
reviewed_head | はい・いいえ | true のとき: Copilot がnameの head コミットをレビューした |
approved_head | はい・いいえ | true のとき: Copilot がnameの head コミットを承認した |
reviews | 数値 | nameの Copilot レビューの数 |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
github_app_approval
Section titled “github_app_approval”Whether a GitHub App approved the pull request.
| フィールド | 種類 | 意味 |
|---|---|---|
approved_head | はい・いいえ | true のとき: nameのアプリが head コミットを承認した |
approved_any | はい・いいえ | true のとき: nameのアプリの承認が有効 |
reviews | 数値 | nameのアプリのレビューの数 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
app | string | はい | For github_app_approval: the GitHub App’s slug; its bot account is “ |
bot_id | integer | いいえ | For github_app_approval: the account id of the app’s bot (GET /users/ |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
github_release
Section titled “github_release”Whether the pull request only changes a version (and the changelog).
| フィールド | 種類 | 意味 |
|---|---|---|
version_only | はい・いいえ | true のとき: nameがバージョン(と変更履歴)だけを変える |
from | 文字列 | nameの変更前のバージョン |
to | 文字列 | nameの変更後のバージョン |
level | 文字列 | nameのバージョンの上げ方(major・minor・patch・none) |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
version_files | string[] | はい | For github_release: the files where a line that sets the version may change (globs), for example package.json or src/version.ts: a key such as version, VERSION or ENGINE_VERSION with the version as its value; in a package.json only its “version” line. |
version_text_files | string[] | いいえ | For github_release: files where any line may carry the version, for docs that name it (globs). Never files that run. |
changelogs | string[] | いいえ | For github_release: changelog files (globs), which may only get lines added; default CHANGELOG.md. |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
github_bump
Section titled “github_bump”Whether the pull request only bumps npm dependency versions.
| フィールド | 種類 | 意味 |
|---|---|---|
applies | はい・いいえ | true のとき: nameが npm の依存の更新 |
only_manifests | はい・いいえ | true のとき: nameが package.json とロックファイルだけを変える |
version_only | はい・いいえ | true のとき: nameが依存のバージョンだけを変える |
semver | 文字列 | nameの最大のバージョンの上げ方(major・minor・patch・none) |
dev_only | はい・いいえ | true のとき: nameが開発用の依存だけを上げる |
registry_changed | はい・いいえ | true のとき: nameがパッケージの取得元を変えうる |
manifest_lines | 数値 | nameの package.json の変更行数 |
release_age_days | 数値 | nameが上げる先のいちばん新しいリリースの公開からの日数 (日) |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。10 秒で調べるのをやめます。
@pointsman/coderabbit
Section titled “@pointsman/coderabbit”モジュール @pointsman/coderabbit のファクト型です。このモジュールが読むデプロイの設定: FACTS_CODERABBIT, FACTS_GITHUB, FACTS_GITHUB_TOKEN, FACTS_GITHUB_APP_ID, FACTS_GITHUB_APP_PRIVATE_KEY
coderabbit
Section titled “coderabbit”CodeRabbit reviews of the pull request.
| フィールド | 種類 | 意味 |
|---|---|---|
installed | はい・いいえ | true のとき: nameのリポジトリで CodeRabbit が動いている |
ignored | はい・いいえ | true のとき: nameの説明が CodeRabbit を止めている |
reviewed_any | はい・いいえ | true のとき: CodeRabbit がnameのコミットをレビューした |
reviewed_head | はい・いいえ | true のとき: CodeRabbit がnameの head コミットをレビューした |
in_progress | はい・いいえ | true のとき: nameの CodeRabbit レビューが動いている |
approved_head | はい・いいえ | true のとき: CodeRabbit がnameの head コミットを承認した |
rebase_only | はい・いいえ | true のとき: nameの head が CodeRabbit の承認したコミットと同じ変更 |
changes_requested | はい・いいえ | true のとき: CodeRabbit がnameに変更を求めている |
unresolved_threads | 数値 | nameの未解決の CodeRabbit スレッドの数 |
outside_diff_findings | はい・いいえ | true のとき: CodeRabbit のnameへの最新レビューに差分外の指摘がある |
billable_files | 数値 | nameの CodeRabbit レビューで課金されるファイルの数 |
price_stated | はい・いいえ | true のとき: CodeRabbit がnameの head の課金ファイル数を示した |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
not_reviewed | string[] | いいえ | For coderabbit and coderabbit_spend: files CodeRabbit does not review (globs, for example **/pnpm-lock.yaml), left out of the billable count Pointsman makes when CodeRabbit stated none. |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
coderabbit_budget
Section titled “coderabbit_budget”The pull request author’s CodeRabbit review budget.
| フィールド | 種類 | 意味 |
|---|---|---|
known | はい・いいえ | true のとき: nameが分かっている |
asked_minutes_ago | 数値 | 作成者がnameを尋ねてからの分数 |
available | 数値 | nameの無料レビューの数 |
wait_stated | はい・いいえ | true のとき: CodeRabbit がnameの待ち時間を示した |
wait_minutes | 数値 | nameで次の無料レビューまでの分数 |
allowance_per_hour | 数値 | nameの 1 時間あたりのレビュー数 |
observed_minutes_ago | 数値 | nameを読んでからの分数 |
taken_by_other_pr | はい・いいえ | true のとき: nameを読んだ後に作成者の他のプルリクエストが無料レビューを使った |
author | 文字列 | nameの作成者 人と地図のための値です。ルールでは使えません。 |
pull_request | 文字列 | nameのプルリクエスト 人と地図のための値です。ルールでは使えません。 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
review_actions | string[] | いいえ | For coderabbit_budget and coderabbit_queue: decision actions that use a free review (default: review). |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
coderabbit_queue
Section titled “coderabbit_queue”The author’s pull requests waiting for a CodeRabbit review ahead of this one.
| フィールド | 種類 | 意味 |
|---|---|---|
ahead | 数値 | nameで先に待っているプルリクエストの数 |
wait_minutes | 数値 | nameでの待ち時間(分) |
author | 文字列 | nameの作成者 人と地図のための値です。ルールでは使えません。 |
pull_request | 文字列 | nameのプルリクエスト 人と地図のための値です。ルールでは使えません。 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
waiting | string[] | はい | For coderabbit_queue: decision actions that mean a pull request waits for a free review (for example wait, queue). A pull request whose latest decision of this profile has one of them waits. |
review_actions | string[] | いいえ | For coderabbit_budget and coderabbit_queue: decision actions that use a free review (default: review). |
max_age_minutes | integer | いいえ | For coderabbit_queue: a waiting decision older than this many minutes no longer counts (default 120, at most 1440). |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
coderabbit_spend
Section titled “coderabbit_spend”The spend on paid CodeRabbit reviews.
| フィールド | 種類 | 意味 |
|---|---|---|
price_usd | 数値 | nameのレビューの価格(米ドル) |
per_pr_usd_after | 数値 | nameのレビュー後のプルリクエストあたりの支出(米ドル) |
per_window_usd_after | 数値 | nameのレビュー後の時間枠あたりの支出(米ドル) |
paid_for_head | はい・いいえ | true のとき: nameの head の有料レビューが依頼され始まった |
author | 文字列 | nameの作成者 人と地図のための値です。ルールでは使えません。 |
pull_request | 文字列 | nameのプルリクエスト 人と地図のための値です。ルールでは使えません。 |
head | 文字列 | nameの head コミット 人と地図のための値です。ルールでは使えません。 |
プロファイルで name・type・at のほかに書ける設定です。
| 設定 | 型 | 必須 | 説明 |
|---|---|---|---|
pay_actions | string[] | はい | For coderabbit_spend: decision actions that pay for a review (for example pay). Every logged decision with one of them counts at its price, once per head, until shown otherwise. |
usd_per_file | number | はい | For coderabbit_spend: the price per billable file, in US dollars, when CodeRabbit stated no price for the head. |
window_hours | integer | いいえ | For coderabbit_spend: the time window of per_window_usd_after, in hours (default 5, at most 24). |
pr_hours | integer | いいえ | For coderabbit_spend: how far back per_pr_usd_after counts payments of the pull request, in hours (default 48, at most 168). |
payer_apps | integer[] | いいえ | For coderabbit_spend: GitHub Apps, by id, whose paid review comments count for paid_for_head (besides the author and organization owners and members). |
not_reviewed | string[] | いいえ | For coderabbit and coderabbit_spend: files CodeRabbit does not review (globs, for example **/pnpm-lock.yaml), left out of the billable count Pointsman makes when CodeRabbit stated none. |
at の位置に値がないときは no_pr(リクエストにプルリクエストがない)として欠けます。5 秒で調べるのをやめます。
値のないファクトは「欠けた」ファクトです。フィールド missing が true になり、reason に理由が入ります。ルールではどちらも使えます。
| 理由 | 意味 | 対象 |
|---|---|---|
unavailable | データが使えない | すべてのファクト |
timeout | 調べるのに時間がかかりすぎた | すべてのファクト |
error | エラー | すべてのファクト |
no_location | リクエストに位置がない | inside, nearest, detour |
no_pr | リクエストにプルリクエストがない | github_pr, github_paths, github_checks, github_property, github_workflows, github_copilot, github_app_approval, github_release, github_bump, coderabbit, coderabbit_budget, coderabbit_queue, coderabbit_spend |
stale | プルリクエストに新しいコミットがある | @pointsman/coderabbit |
no_log | 読める判定ログがない(テストトークン、または判定の外での参照) | @pointsman/coderabbit |