Repository navigation
fix(docs-issue-picker): require project-qualified issue input for GitLab migration, fixes #163 - #173
Merged
Merged
Conversation
|
jameswilson
requested changes
Jul 1, 2026
|
|
||
| <h2 id="issue-forks">Issue forks</h2> | ||
| <p>An issue fork must already exist on <a class="cds-link" href="https://git.drupalcode.org">git.drupalcode.org</a> — use <strong>Get push access</strong> on the drupal.org issue to create one, then reload here.</p> | ||
| <p>An issue fork must already exist on <a class="cds-link" href="https://git.drupalcode.org">git.drupalcode.org</a> before it shows up here. For issues still on drupal.org, use <strong>Get push access</strong> on the issue page to create one. For projects whose issue queue has migrated to GitLab, create the fork from the issue's GitLab page instead — then reload here.</p> |
Collaborator
There was a problem hiding this comment.
GitLab doesn't have a way to create an issue fork. It has to be done from the "Fork Management" page on drupal.org; something like this:
As far as I can tell, GitLab also doesn't provide an obvious link to that page, so maybe we can improve the messaging and provide a direct link?
Sadly, issues created on drupal.org issue queues cannot (currently) use the Fork Management page, so we have to keep the if statement in place based on the source of the issue (drupalorg vs gitlab).
Member
Author
There was a problem hiding this comment.
I think this is improved now, thanks for looking. I'll pull this when tests complete successfully.
…t GitLab issue URLs Drupal issue IDs are no longer globally unique now that drupal.org issue queues are migrating to GitLab per-project (#163) - a bare number can silently resolve to the wrong project. Drop bare-number input, add GitLab issue URL parsing, and fall back to the GitLab Issues API when a drupal.org issue lookup comes back empty because the project migrated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…flow The "no issue fork exists" message asserted a drupal.org-specific "Get push access" button regardless of source, which is wrong for GitLab-native issues (e.g. media_image_metadata/-/work_items/3558227) and not something this tool verifies either way. It only needs to report that no fork exists and point at the issue. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rg's Fork Management page James Wilson's review on #173 noted GitLab has no self-service fork-creation UI of its own -- the actual mechanism is drupal.org's Fork Management page with a source_link query param pointing at the GitLab issue. The prior follow-up commit fixed this in spirit but left the static "Issue forks" prose still telling users to "create the fork from the issue's GitLab page," which is exactly the incorrect claim James flagged. Fix the prose and give the dynamic no-fork message a working, pre-filled link instead of a bare issue URL. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…orkspace names to 32 chars Only the issue-fork name generator (suggestedIssueForkWorkspaceName) capped its output to Coder's 32-character workspace name limit. The plain-project and manual-form generators (syncPlainWorkspaceName, syncManualWorkspaceName, and their launch-time fallbacks) built names the same way but never capped them, so a long project machine name or version/profile combo could auto-fill a suggestion that was already invalid with no indication of how to fix it. Extract the existing cap logic into a shared capWorkspaceName() helper and apply it consistently across all three name generators. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
rfay
added a commit
that referenced
this pull request
Sep 21, 2026
…g the project Once a contrib project's issue queue migrates to GitLab, its old drupal.org node IDs get reused for unrelated content (e.g. node 3591879 is some other project's release node, while GitLab issue ui_icons#3591879 is a real, different issue — see #163). The workspace's issue-title/link lookup only ever queried the classic drupal.org API, so for a migrated project it could silently show an unrelated issue's title and link to a dead/wrong drupal.org page instead of failing cleanly. Verify the drupal.org lookup's field_project.machine_name actually matches this project before trusting it, and fall back to GitLab's own project-qualified issues API (git.drupalcode.org/project/.../-/issues/...) when it doesn't match or drupal.org has no such node. Mirrors the same fallback the docs issue picker already does (PR #173). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
3565155resolves to nothing in the classic API formedia_image_metadata, since that issue only exists on GitLab).PROJECT-NIDfork shorthand).git.drupalcode.org/project/{project}/-/issues/{iid}and-/work_items/{iid}).api-d7lookup comes back empty and the picker now falls back to the GitLab Issues API using the project name already captured from the URL.issue_fork/issue_branchparams and theissue/{project}-{id}fork-branch convention on git.drupalcode.org are unchanged by the migration and already worked as opaque strings.Manual test plan
Open the docs PR preview (link posted by the docs-preview workflow below) and paste each input into the picker's input field, confirming the described result. All examples are live, real issues/forks as of this PR.
3568144https://www.drupal.org/project/drupal/issues/35681443568144-editorfilterxss-11.xpreselectedhttps://www.drupal.org/project/token/issues/35952713595271-image-style-tokenspreselectedhttps://git.drupalcode.org/project/media_image_metadata/-/issues/35651553565155-numeric-metadata-valuespreselectedhttps://git.drupalcode.org/project/media_image_metadata/-/work_items/3565155-/work_items/is the other GitLab URL shape for the same issue)https://git.drupalcode.org/project/media_image_metadata/-/issues/3558227https://www.drupal.org/project/media_image_metadata/issues/3565155token-3595271drupal-3568144https://www.drupal.org/project/tokentokennot a valid inputAlso confirmed:
node --checkon the extracted<script>block passes (no syntax errors).parseInput()against all inputs above outside the browser (vianode -e) to confirm the parsed{type, nid, project, source}shape before doing the live manual pass.🤖 Generated with Claude Code