- Made the bookmarklet asynchronous and moved the commit message into a shared
outputvariable before prompting - Replaced the “open issue view first” alert with clipboard-based support for multiple selected Linear issues, including clipboard permission and empty-selection error handling
- Added parsing for copied Linear issue links, unescaping titles, normalizing issue IDs into
[FOO-123]format, and joining multiple messages with; - Updated the usage note to mention generating a commit message from multiple selected issues copied to the clipboard
Changes
- Your commit messages should include the ID of the issue your code belongs to.
- Our preferred syntax prefixes the issue title with its ID in brackets, e.g. `[FOO-123] Avatars for users`.
- Here is how to generate that from an issue in Linear.
- Add a new link to your browser's bookmarks bar with the following URL.
- ```js
-javascript:(() => {- +javascript:(async () => {
- + let output;
- +
- if (document.querySelector('[data-view-id="issue-view"]')) {
- const [id, ...words] = document.title.split(' ');-prompt('Commit message:', `[${id}] ${words.join(' ')}`)- + const [id, ...words] = document.title.split(' ');
- +output = `[${id}] ${words.join(' ')}`;
- } else {
- alert('Open issue view first')- +let text;
- + try {
- + text = await navigator.clipboard.readText();
- + } catch (error) {
- + return alert('Error: Access to clipboard required');
- + }
- + const titles = [...text.matchAll(/\[((?:\\.|[^\]\\])+)\]\([^)]*\)/g)]
- + .map(match => match[1].replace(/\\(.)/g, '$1').trim().replace(/^([A-Z]+-\d+):?\s*/, '[$1] '))
- + .filter(Boolean);
- + if (!titles.length) {
- + return alert('Error: No linear issues selected');
- + }
- + output = titles.join('; ');
- }
-})()- + prompt('Commit message:', output);
- +})();
- ```
-When viewing an issue, you can now click that link to open a browser prompt where you can Ctrl+C your commit message.- +* When viewing an issue, you can now click that link to open a browser prompt where you can Ctrl+C your commit message.
- +* When selecting multiple issues with (Press X on highlighted issues and CTRL+C to copy all to the clipboard), you can now click that link to open a browser prompt where you can Ctrl+C your commit message.
- +
- +
Posted by Emanuel to makandra dev (2026-10-09 06:25)