-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Problem
The current implementation of issueUrls and prUrls in metadata has a flaw:
- Issue workflows: populate
issueUrls, leaveprUrlsempty ✓ - PR workflows: populate
prUrls, leaveissueUrlsempty ✗
This is incorrect because PRs typically originate from issues. A PR workflow (e.g., branch issue-42__feature with PR #123) should populate both:
issueUrls: { "42": "https://github.com/org/repo/issues/42" }prUrls: { "123": "https://github.com/org/repo/pull/123" }
Current Behavior
In LoomManager.ts, the metadata is built like this:
// For issue workflows
issueUrls: input.type === 'issue' ? { [String(input.identifier)]: issueData?.url ?? '' } : {},
prUrls: input.type === 'pr' ? { [String(input.identifier)]: issueData?.url ?? '' } : {},Expected Behavior
For PR workflows:
- Extract issue number(s) from branch name (already done via
issue_numbersarray) - Fetch or construct the issue URL(s)
- Populate both
issueUrlsANDprUrls
Considerations
- The issue URL could be constructed from the issue number + repo URL pattern
- Alternatively, an additional API call could fetch the issue data
- The
issue_numbersarray is already populated for PR workflows, so the issue numbers are available
Related
Introduced in #342
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done