Feature 112/jira imports #117
No reviewers
Labels
No labels
bug
ci
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
performance
priority
P0
priority
P1
priority
P2
question
refactor
size
L
size
M
size
S
size
XL
size
XS
tests
trivial
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/paso!117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature-112/jira-imports"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
CONTRIBUTING.mdgo test ./... -race) locallygofmt -w .andgolangci-lint run ./...respectivelyREADME.mdif applicableSummary
Closes: #112
@ -0,0 +1,155 @@// Package jira provides types and functionality for fetching Jira issues.The single layout
"2006-01-02T15:04:05.000-0700"does not parse ISO 8601 timestamps that useZas the UTC designator (e.g."2026-02-16T10:00:00.000Z"), which the Jira REST API can emit. When parsing fails, the error is silently discarded andCreatedAtis set to the zero value — imported comments carry wrong timestamps without any user-visible warning.Or use
time.RFC3339/time.RFC3339Nanowhich handles bothZand numeric offsets.@ -0,0 +1,161 @@package jiraThis guard is unreachable. The command declares
Args: cobra.ExactArgs(1), so cobra rejects the invocation beforeExecuteis ever called if no argument is provided. Dead code.@ -0,0 +39,4 @@}// IssueFetcher defines the interface for fetching Jira issues.type IssueFetcher interface {IssueFetcheris defined in the implementing (jira) package, but AGENTS.md — updated in this very PR — states that interfaces belong in the package that uses them, not the one that implements them. The consuming package isapp, so the interface should live there (or in a shared types package), not here.Summary
Three concrete issues found:
Silent data corruption (
internal/jira/jira.go:133) — The timestamp parser uses a single fixed layout that does not handleZ-suffix UTC strings, which the Jira REST API can produce. Parse failures are silently discarded and zero-time is stored without any warning to the user.Dead code (
internal/cli/jira/import.go:59) — Thelen(args.Args) == 0guard is unreachable becausecobra.ExactArgs(1)enforces the arity constraint beforeExecuteis ever invoked.Interface placement (
internal/jira/jira.go:42) —IssueFetcheris defined in the implementing package, contradicting the convention explicitly reinforced in the AGENTS.md changes included in this same PR.Score: 7/10
@ -0,0 +39,4 @@}// IssueFetcher defines the interface for fetching Jira issues.type IssueFetcher interface {skipping this one