Loading...
Loading...
Ties a GitHub pull request or GitLab merge request to an RHDH Jira issue in RHIDP, RHDHPLAN, RHDHBUGS, or RHDHSUPP: attach the Jira Web link titled `repo #N: <title>`, post or update the structured comment, fill empty issue fields, move an RHDHPLAN Epic, Story, or Task to RHIDP, and mark a Web link merged. Raises the PR or MR first when one does not exist yet. Use for "link this PR to RHIDP-1234", "attach the MR to the Jira issue", "mark the Web links merged", replacing a hand-rolled remotelink or comment step, or a PR outside the rhdh-plugins and community-plugins monorepo flow. The full monorepo flow — build, changeset, recordings — is rhdh-pr-create.
npx skill4agent add redhat-developer/rhdh-skills rhdh-jira-linkscripts/SKILL="$(cd "$(dirname "$0")" && pwd)" # or the absolute path to this skill root
node "$SKILL/scripts/create-pr-mr.js" …
node "$SKILL/scripts/link-pr-mr.js" …/rhdh-jira-linkcreate-pr-mr.jsnode "$SKILL/scripts/create-pr-mr.js" \
--issue RHIDP-12345 \
--title 'fix: short summary' \
--target main \
--body "$(cat <<'EOF'
## Summary
- …
## Test plan
- [ ] …
Generated-by: cursor
EOF
)"git push -u origin HEAD--no-pushorigingh pr createglab mr createlink-pr-mr.js link--no-link--no-link--no-open--draft--no-push--no-link--no-open--no-defaults--no-comment--no-jira-ref--host github|gitlabJIRA_API_TOKENloginserver~/.config/.jira/.config.yml.jira-tokenemail:tokenacli/rhdh-jira-api/rhdh-jira-apicreate-pr-mr.jsRef: https://redhat.atlassian.net/browse/KEYGenerated-by: cursorRef:community-plugins--no-jira-reflink-pr-mr.jsnode "$SKILL/scripts/link-pr-mr.js" link \
--issue RHIDP-12345 \
--url 'https://gitlab.cee.redhat.com/rhidp/example/-/merge_requests/817' \
--title 'example #817: fix: short summary' \
--host gitlab--host--no-defaults--no-commentlinkmove: …issue:keptPR/MR:
* example #817: fix: short summary
Adjusted fields:
* Priority: Normal
* Status: In Progressrepo #N: <title>node "$SKILL/scripts/link-pr-mr.js" mark-merged --issue RHIDP-12345[x] merged:mark-mergedghglabwarn:--hostnamegitlab.cee.redhat.comglabhost: gitlab.cee.redhat.com~/.config/glab-cli/config.yml[<title>](<url>)link --title<repo-short-name> #<id>: <full PR/MR title>[x] merged: <repo-short-name> #<id>: <full PR/MR title>link--no-defaultsmkdir -p ~/.config/rhdh-jira-link
cp "$SKILL/config.example.json" ~/.config/rhdh-jira-link/config.json
# edit assigneeEmail, teamId, teamName, boardId, …$JIRA_PR_MR_CONFIG$SKILL/config.local.jsonloginboard.id~/.config/.jira/.config.yml| Field | Required when applying defaults |
|---|---|
| yes (or Jira |
| yes, or set either to |
| yes (or jira CLI |
| yes |
| yes (only fills when priority is empty) |
| yes |
| yes, unless team/sprint skipped via |
| Status | → In Progress unless already In Progress / Review / Closed |
--no-defaultsJIRA_PR_MR_APPLY_DEFAULTS=0"teamName": "NONE",
"teamId": "NONE"/rhdh-pr-create/rhdh-pr-create/rhdh-pr-create--no-defaults/rhdh-pr-createGenerated-by: cursorcreate-pr-mr.jsRef:create-pr-mr.jsurl:diffs:browserOpened:jiraLink:browserOpened: true--no-openlink-pr-mr.jslink-pr-mr.js mark-merged --issue KEY[<title>](<url>)/mutation-gatewarn: