BUILD-12598 Update Manage Vault Policy deep link for org-first picker - #352
julien-carsique-sonarsource wants to merge 1 commit into
Conversation
24b71e0 to
fbbb86c
Compare
manage_vault_policy is dropping its direct binding to the github_repository blueprint in favor of an org-first picker (github_organization + github_repository form fields) — see SonarSource/port-actions#532. The $targetEntity deep-link key this action's check-sca step relies on to prefill the "grant access" link on SCA-check failures becomes meaningless once that binding is dropped, leaving the linked form empty. Prefill the two new fields instead: github_organization from GITHUB_REPOSITORY_OWNER, github_repository from the org-qualified entity identifier (org/repo, matching Port's github_repository entity identifier convention). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
fbbb86c to
b49e7a9
Compare
|
Code Review ✅ Approved 2 closed / 2 findings🟡 Medium risk · Changes generated Port deep-link inputs and runtime prefill behavior. Updates the Manage Vault Policy deep link to use org-first picker fields ( ✅ 2 closed✅ Bug: Merging before port-actions#532 drops the working repo prefill
✅ Edge Case: Digit-led JSURL string guard removed for new string values
Review coverage🧪 Functional validation 2 of 2 objectives covered 📋 Rules No rules evaluated 🤖 Auto-approval Not enabled · Set up Implementation Status ✅ 2 of 2 objectives covered✅ BUILD-12598 - 2 of 2 objectives coveredThis PR covers both objectives by updating the manage vault policy deep link to use the org-first picker pattern with organization and repository fields. ✅ 2 covered here
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



Summary
Companion fix to port-actions#532: that PR drops
manage_vault_policy's direct binding togithub_repositoryin favor of an org-first picker (github_organization+github_repositoryform fields).check-sca/action.yml's "Build Manage Vault Policy link" step builds the "grant access" deep link shown on SCA-check failures, using$targetEntityto prefill the bound entity. That key becomes meaningless once port-actions#532 merges — the linked form opens empty instead of prefilled.Changes
github_organizationprefilled fromGITHUB_REPOSITORY_OWNER,github_repositoryfrom the org-qualified entity identifier (org/repo), replacing$targetEntity.1password), which JSURL would otherwise misparse as a number.Test plan
No existing test coverage exercises this step's JSURL output. Verified the encoding with the
jsurl2library Port's docs point to, end to end including the script's own percent-encoding of(,),~:Matches the intended prefill in both cases.
Coordination
Can merge in either order relative to https://github.com/SonarSource/port-actions/pull/532, back-to-back — the link only misses its prefill for the gap between the two merges, no functional or security impact.