@link-assistant/hive-mind 1.78.6 → 1.78.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @link-assistant/hive-mind
|
|
2
2
|
|
|
3
|
+
## 1.78.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c1617ae: Fix `/task` issue creation when replying to a message: combine the inline command (e.g. the repository URL) with the replied-to message (the issue text) instead of dropping the reply, so replying with `/task <repository-url>` now creates the GitHub issue (issue #1916).
|
|
8
|
+
|
|
3
9
|
## 1.78.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -24,8 +24,13 @@ export function stripTaskCommandPrefix(text) {
|
|
|
24
24
|
|
|
25
25
|
export function resolveTaskIssueCreationInput({ commandText = '', replyText = '' } = {}) {
|
|
26
26
|
const inlineText = stripTaskCommandPrefix(commandText);
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const reply = normalizeNewlines(replyText).trim();
|
|
28
|
+
// When replying to a message, the inline command and the replied-to message
|
|
29
|
+
// are complementary: one often carries the repository URL while the other
|
|
30
|
+
// carries the issue text (issue #1916). Combine both so neither part is lost.
|
|
31
|
+
// Inline text comes first so it takes precedence for title/body ordering.
|
|
32
|
+
if (inlineText && reply) return `${inlineText}\n${reply}`;
|
|
33
|
+
return inlineText || reply;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
export function parseTaskRepository(value) {
|
|
@@ -72,6 +77,12 @@ function parseRepositoryLine(line) {
|
|
|
72
77
|
function setRepository(currentRepository, nextRepository) {
|
|
73
78
|
if (!nextRepository) return { repository: currentRepository };
|
|
74
79
|
if (currentRepository) {
|
|
80
|
+
// The same repository may legitimately appear in both the inline command
|
|
81
|
+
// and the replied-to message once they are combined (issue #1916). Treat
|
|
82
|
+
// identical repositories as a no-op and only reject genuine conflicts.
|
|
83
|
+
if (currentRepository.fullName === nextRepository.fullName) {
|
|
84
|
+
return { repository: currentRepository };
|
|
85
|
+
}
|
|
75
86
|
return {
|
|
76
87
|
repository: currentRepository,
|
|
77
88
|
error: 'Only one GitHub repository may be provided.',
|
|
@@ -131,10 +131,12 @@ export function registerTaskCommands(bot, options) {
|
|
|
131
131
|
const splitMode = commandName === 'split' || hasTaskSplitFlag(parsedArgs);
|
|
132
132
|
|
|
133
133
|
if (!splitMode) {
|
|
134
|
+
const replyText = getReplyText(ctx.message);
|
|
134
135
|
const creationInput = resolveTaskIssueCreationInput({
|
|
135
136
|
commandText: ctx.message.text,
|
|
136
|
-
replyText
|
|
137
|
+
replyText,
|
|
137
138
|
});
|
|
139
|
+
VERBOSE && console.log(`[VERBOSE] ${commandDisplay} issue creation: isReply=${Boolean(replyText)} replyChars=${replyText.length} resolvedChars=${creationInput.length}`);
|
|
138
140
|
const creation = parseTaskIssueCreationInput(creationInput);
|
|
139
141
|
|
|
140
142
|
if (!creation.valid) {
|