Skip to content

fix(gitlab): update N4 custom script for new GitLab UI#2407

Merged
sanjinkapetanovich merged 1 commit intomasterfrom
fix/n4-gitlab-custom-script
Feb 10, 2026
Merged

fix(gitlab): update N4 custom script for new GitLab UI#2407
sanjinkapetanovich merged 1 commit intomasterfrom
fix/n4-gitlab-custom-script

Conversation

@sanjinkapetanovich
Copy link
Contributor

🌟 What does this PR do?

Issue

The N4 custom GitLab script stopped working after GitLab updated their UI. The old selectors (.issue-details, .detail-page-header, data-qa-label-name) no longer exist in the new GitLab interface.

Cause

GitLab migrated to a new UI that uses data-testid attributes instead of the previous class-based selectors. The issue ID extraction method (URL regex) also needed updating to use the body's data-page-type-id attribute.

Solution

Updated all selectors to match the new GitLab UI:

  • Issues: span[data-testid="work-item-created"]
  • Merge Requests: .detail-page-description
  • Labels: [data-testid="selected-label-content"] span.gl-label-text
  • ID extraction: body.getAttribute('data-page-type-id')

Also cleaned up the code by removing debugger statements and adding proper JSDoc header.

💬 Summarise how you feel about this PR with a gif

fixed

@sanjinkapetanovich sanjinkapetanovich merged commit ac0dd85 into master Feb 10, 2026
1 check passed
@sanjinkapetanovich sanjinkapetanovich deleted the fix/n4-gitlab-custom-script branch February 10, 2026 12:35
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.

2 participants