semantic-release / semantic-release/issue-parser
Handle Gitlab closing comma separated actions
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 4
- Avg merge
- 1m
- Merged PRs (30d)
- 3
Description
Parser configuration
const issueParser = require('issue-parser');
const parse = issueParser('gitlab');
Text to parse
From: Managing Issues > Default closing pattern
Awesome commit message
Fix #20, Fixes #21 and Closes group/otherproject#22.
This commit is also related to #17 and fixes #18, #19
and https://gitlab.com/group/otherproject/issues/23.
Current Behavior
{
"actions": {
"close": [
{
"raw": "Fix #20",
"action": "Fix",
"prefix": "#",
"issue": "20"
},
{
"raw": "Fixes #21",
"action": "Fixes",
"prefix": "#",
"issue": "21"
},
{
"raw": "Closes group/otherproject#22",
"action": "Closes",
"slug": "group/otherproject",
"prefix": "#",
"issue": "22"
},
{
"raw": "fixes #18",
"action": "Fixes",
"prefix": "#",
"issue": "18"
}
],
"duplicate": []
},
"refs": [
{
"raw": "#17",
"prefix": "#",
"issue": "17"
},
{
"raw": "#19",
"prefix": "#",
"issue": "19"
},
{
"raw": "https://gitlab.com/group/otherproject/issues/23",
"slug": "group/otherproject",
"issue": "23"
}
],
"mentions": []
}
Expected behavior
Issue 19 and 23 should be interpreted as close.
If it helps, their parser code is at: closing_issue_extractor.rb
{
"actions": {
"close": [
{
"raw": "Fix #20",
"action": "Fix",
"prefix": "#",
"issue": "20"
},
{
"raw": "Fixes #21",
"action": "Fixes",
"prefix": "#",
"issue": "21"
},
{
"raw": "Closes group/otherproject#22",
"action": "Closes",
"slug": "group/otherproject",
"prefix": "#",
"issue": "22"
},
{
"raw": "fixes #18",
"action": "Fixes",
"prefix": "#",
"issue": "18"
},
{
"raw": "#19",
"prefix": "#",
"issue": "19"
},
{
"raw": "https://gitlab.com/group/otherproject/issues/23",
"slug": "group/otherproject",
"issue": "23"
}
],
"duplicate": []
},
"refs": [
{
"raw": "#17",
"prefix": "#",
"issue": "17"
},
{
"raw": "#19",
"prefix": "#",
"issue": "19"
},
{
"raw": "https://gitlab.com/group/otherproject/issues/23",
"slug": "group/otherproject",
"issue": "23"
}
],
"mentions": []
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the shown text through issueParser('gitlab') and tracing its GitLab closing-action handling, using GitLab's closing_issue_extractor.rb as the comparison point. The parser should classify issue 19 and the issue 23 URL as close actions while retaining them in refs as shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gitlab, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100