PR comment shows empty "before" for modified values
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- devops
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- JavaScript
- Stars
- 942
- Forks
- 238
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github-community-projects/safe-settings
-
Teams: teams with organization-role access show up as deletionsPossibly taken @TovaBecker claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
github-community-projects/safe-settings#1144 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
github-community-projects/safe-settings#1143 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
github-community-projects/safe-settings#1135 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
github-community-projects/safe-settings#1134 ·
Maintainers usually reply within 2 days
-
environments: additive_plugins is ignored, undeclared environments are deletedPossibly taken @yaunj claimed this 12 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
github-community-projects/safe-settings#1133 ·
Maintainers usually reply within 2 days
All issues in github-community-projects/safe-settings
Similar issues
-
area:webapp bug finding
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
humlab-sead/sead_shape_shifter#779 ·
Maintainers usually reply within 1 day
-
enhancement feature/llm-analytics
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PostHog/posthog#139959 · 1 comment ·
Maintainers usually reply within 1 day
-
ci good first issue priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
mobeloper/better-oss#23 ·
-
accessibility Could Have good first issue seo
Difficulty 1/5 Under an hour Newbie friendliness 88/100
hannahro15/Musical-Match-Saga#278 ·
Maintainers usually reply within 1 day