Autofill the commit type from the issue category
>>> [!note] Issue information <!-- Drupal.org comment --> <!-- Migrated from issue #3547155. --> From user: [joachim](https://www.drupal.org/user/107701) [Contribution record](https://www.drupal.org/contribution-record?source_link=https://git.drupalcode.org/project/contribution_records/-/issues/3547155) [Fork management](https://www.drupal.org/drupalorg/issue-fork/management?source_link=https://git.drupalcode.org/project/contribution_records/-/issues/3547155) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>At the moment, the commit type box has 'feat' in it all the time.</p> <p>If the issue is a bug, it should have 'fix' instead.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <pre>// Mapped<br>- Bug report =&gt; fix<br>- Task =&gt; task<br>- Feature request =&gt; feat<br><br>// Not mapped. Use default: fix<br>- Support request =&gt; fix<br>- Plan =&gt; fix</pre><p>Approach:<br> - Add method "getCategory" to "SourceLinkInterface.php"<br> - Implemente this method in:<br> --- DrupalOrgIssue.php: where we read the "field_issue_category" field and map the 5 categories to some agreed values.<br> --- 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.</p> <p>Then we could use this method to pass information to the page and set the input default value.</p> > Related issue: [Issue #3543076](https://www.drupal.org/node/3543076)
issue