PR comment shows empty "before" for modified values

オープン
#1,110 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript
領域
devops

調査の方向性

Start in lib/mergeDeep.js, where compareDeep() records only the new value for a modified scalar, then in the before lookup in lib/settings.js that the PR comment renderer uses. Reproduce with a dry run where a repo's visibility is removed from its settings file, and confirm the comment shows an empty before. Done means the comment shows the current live value (for example private) for modified scalars, and the same holds for default_branch, delete_branch_on_merge, and team permissions.

索引モデルが issue の本文から書いたものです。

説明

Version: 3.0.0

In the dry-run PR comment, every modified value shows an empty before, even when the live value exists.

Example: a repo is visibility: private on GitHub. Deleting its repo file reverts it to the org default internal. The comment shows:

~ `visibility`
  - before: ``
  - after: `internal`

The same happens for default_branch, delete_branch_on_merge, and team permission changes.

Cause: MergeDeep.compareDeep() stores only the new value for a modified scalar (modifications[key] = sourceValue, lib/mergeDeep.js). The renderer in lib/settings.js takes before from a matching deletion entry, which doesn't exist for modified values.

Expected: before shows the current value on GitHub, for example private.

主要言語
JavaScript
スター
942
フォーク
238
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github-community-projects/safe-settings のほかの issue

github-community-projects/safe-settings の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。