Autofill the commit type from the issue category
Problem/Motivation
At the moment, the commit type box has 'feat' in it all the time.
If the issue is a bug, it should have 'fix' instead.
Proposed resolution
// Mapped
- Bug report => fix
- Task => task
- Feature request => feat
// Not mapped. Use default: fix
- Support request => fix
- Plan => fix
Approach:
- Add method "getCategory" to "SourceLinkInterface.php"
- Implemente this method in:
--- DrupalOrgIssue.php: where we read the "field_issue_category" field and map the 5 categories to some agreed values.
--- GitDrupalCodeBase.php: where we read the issue labels, filter "category::*" ones and do some kind of mapping too (or just take what's after the "::"). Note that there could be more than one in this scenario so a decision should be made as for what to take.
Then we could use this method to pass information to the page and set the input default value.
Related issue: Issue #3543076
Related issue: Issue #3542433
Edited by drupalbot