2.1.21: CustomProperties plugin still crashes — modifyProperty() calls renamed octokit methods
メンテナーはふだん 1 日以内に返信
@breymander がすでに取り組んでいます。
2026年7月16日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- github, javascript
調査の方向性
lib/plugins/custom_properties.js の find()(43 行目付近)と modifyProperty()(113 行目付近)から始め、これらの呼び出しを Octokit v17 のエンドポイント名と比較します。リポジトリごとの custom_properties ブロックを使って再現し、値が取得されること、未定義メソッドのエラーなしに更新が完了すること、nop パスによって reconcile がクラッシュしないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Problem Description
What is actually happening
lib/plugins/custom_properties.js calls two octokit methods that no longer exist in @octokit/plugin-rest-endpoint-methods@17 (transitively pulled in by octokit@^5.0.2 and probot@^14.2.4):
octokit.rest.repos.getCustomPropertiesValues→customPropertiesForReposGetRepositoryValuesoctokit.rest.repos.createOrUpdateCustomPropertiesValues→customPropertiesForReposCreateOrUpdateRepositoryValues
The rename is a documented breaking change in @octokit/plugin-rest-endpoint-methods v17.0.0:
BREAKING CHANGES
- Several custom property endpoints changed ID
Concrete failure chain on a PR that adds any per-repo custom_properties: block:
find()(line 43) callspaginate(undefined, ...). paginate falls back toGET https://api.github.com/, returns the API root JSON wrapped as a 1-item array. Log saysFound 1 custom propertiesbut no values were actually fetched.- The 2.1.21-patched
normalize()defensively skips that bogus entry →target [] with source [{...}]. - Diff thinks the property is a brand-new addition →
add()→modifyProperty('Create', ...). modifyProperty()(line 113) accessesthis.github.rest.repos.createOrUpdateCustomPropertiesValues.endpoint(params). The method isundefined→ synchronous TypeError.- The throw escapes
Promise.allinSettings.updateRepos→ unhandled rejection → Node exits 1 → container restarts. The PR check-run created at validation start is never closed, so the validator is stuckIN_PROGRESSindefinitely.
#971 was closed as fixed in 2.1.21, but #978 only patched the symptom in normalize(). The original reporter never reached modifyProperty() because they crashed earlier. With the normalize fix in place, we now reach the next call and die there — same root cause (the v17 rename), different line.
What is the expected behavior
CustomProperties should call the renamed methods (or use octokit.request("GET /repos/{owner}/{repo}/properties/values") / ("PATCH /repos/{owner}/{repo}/properties/values") to be stable across endpoint-methods versions).
The if (this.nop) branch should also be wrapped in try/catch so a single misconfiguration cannot crash the whole reconcile.
Error output, if available
DEBUG (event): Getting all custom properties for the repo <org>/<repo>
DEBUG (octokit): GitHub request: GET https://api.github.com - 200
DEBUG (event): Found 1 custom properties
DEBUG (event): [] [{"name":"<prop>","value":"<value>"}]
DEBUG (event): Results of comparing CustomProperties diffable target [] with source [...] is {"msg":"Changes found","additions":{"0":{"name":"<prop>","value":"<value>"}},"modifications":{}}
/opt/safe-settings/lib/plugins/custom_properties.js:113
this.github.rest.repos.createOrUpdateCustomPropertiesValues.endpoint(params),
^
TypeError: Cannot read properties of undefined (reading 'endpoint')
at CustomProperties.modifyProperty (/opt/safe-settings/lib/plugins/custom_properties.js:113:69)
at CustomProperties.add (/opt/safe-settings/lib/plugins/custom_properties.js:88:17)
at /opt/safe-settings/lib/plugins/diffable.js:115:33
at Array.forEach (<anonymous>)
at /opt/safe-settings/lib/plugins/diffable.js:109:25
at async Promise.all (index 1)
at async Settings.updateRepos (/opt/safe-settings/lib/settings.js:384:30)
at async Promise.all (index 0)
at async Settings.syncAll (/opt/safe-settings/lib/settings.js:24:7)
100% reproducible.
Context
Are you using the hosted instance of probot/settings or running your own?
Self-hosted, official upstream image ghcr.io/github/safe-settings:2.1.21 on Kubernetes.
If running your own instance, are you using it with github.com or GitHub Enterprise?
github.com (Enterprise Cloud plan, not Enterprise Server).
Version of probot/settings
- safe-settings: 2.1.21
- probot: 14.2.4
- octokit: 5.0.5
- @octokit/plugin-rest-endpoint-methods: 17.0.0
Version of GitHub Enterprise
N/A — Enterprise Cloud, not Server.
- 主要言語
- JavaScript
- スター
- 926
- フォーク
- 230
- 平均マージ
- 3日 9時間
- マージ済み PR(30日)
- 18
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github-community-projects/safe-settings のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
github-community-projects/safe-settings#1115 ·
メンテナーはふだん 1 日以内に返信
-
app_installations reports an error on every repo or suborg change when the plugin is not configuredオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
github-community-projects/safe-settings#1111 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Repos transferred into the org are not synced (no repository.transferred handler)対応中かも @breymander が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
github-community-projects/safe-settings#1107 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Dry run only inspects the first 30 changed files (pulls.listFiles is not paginated)対応中かも @3rwww1 が 36 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github-community-projects/safe-settings#1080 ·
メンテナーはふだん 1 日以内に返信
-
PR comment diff table shows an empty vertical scrollbar due to malformed <tr> markup再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
github-community-projects/safe-settings#1077 ·
メンテナーはふだん 1 日以内に返信
github-community-projects/safe-settings の issue をすべて見る
似ている issue
-
enhancement javascript python
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
jlab-sensing/ENTS-backend#851 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
guilhermerodz/input-otp#157 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
davidjerleke/embla-carousel#1414 ·
メンテナーはふだん 4 日以内に返信
-
0. Needs triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信