Skip to content

fix(scripts): always update justification text even when radio already checked#113

Merged
clouatre merged 1 commit intomainfrom
fix/openssf-justification-always-update
Mar 31, 2026
Merged

fix(scripts): always update justification text even when radio already checked#113
clouatre merged 1 commit intomainfrom
fix/openssf-justification-always-update

Conversation

@clouatre
Copy link
Copy Markdown
Member

Summary

The OpenSSF badge script skips the entire criterion entry (including justification textarea) when the radio button is already checked. This means updated justification strings (e.g., MIT -> Apache 2.0) never reach the OpenSSF database on re-runs.

Root cause

In fillSection(), the justification textarea.fill() block sits inside the else branch of the isChecked || isDisabled check. It should be outside the if/else entirely.

Fix

Move the justification update block (lines ~1013-1022) to execute unconditionally after the radio check, whether or not the radio was skipped.

Changes

  • scripts/fill-openssf-badge.ts -- restructure fillSection() so textarea fill always runs

Test plan

  • Re-running the script with all radios already checked still updates all justification textareas

…y checked

Signed-off-by: Hugues Clouâtre <hugues@linux.com>
@clouatre clouatre merged commit c19c4dc into main Mar 31, 2026
8 checks passed
@clouatre clouatre deleted the fix/openssf-justification-always-update branch March 31, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant