Skip to content

Conversation

@uta8a
Copy link
Owner

@uta8a uta8a commented Feb 11, 2026

  • Rename linear-pick-one to linear-tools
  • Add fetch:recently-done command to fetch completed tasks within N days (default 7)
  • Update CI workflow and documentation (AGENTS.md, copilot-instructions.md, renovate.json5)
  • Add completedAt field to Task interface
  • Add filterTasksCompletedWithinDays function for date-based filtering

… feature

- Rename linear-pick-one to linear-tools
- Add fetch:recently-done command to fetch completed tasks within N days (default 7)
- Update CI workflow and documentation (AGENTS.md, copilot-instructions.md, renovate.json5)
- Add completedAt field to Task interface
- Add filterTasksCompletedWithinDays function for date-based filtering
@uta8a uta8a requested a review from Copilot February 11, 2026 11:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

linear-pick-onelinear-tools にリネームし、直近完了タスク(Recently Done)を日数指定で取得・保存できる CLI コマンドを追加するPRです。

Changes:

  • linear-tools へのリネーム(README/CI/Renovate/ガイド類の更新)
  • fetch:recently-done コマンド追加と、完了日時 (completedAt) を扱う機能追加
  • 完了日フィルタ(直近N日)と Recently Done 用 Markdown 出力/保存機能の追加

Reviewed changes

Copilot reviewed 9 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
linear-tools/src/fetch-tasks.ts completedAt 追加、Recently Done 用整形/保存、直近N日フィルタ等を追加
linear-tools/src/fetch-tasks.test.ts 新機能(フィルタ/Markdown整形)のテストを追加
linear-tools/src/fetch-recently-done.ts fetch:recently-done のCLIエントリポイントを新規追加
linear-tools/package.json パッケージ名変更と fetch:recently-done スクリプト追加
linear-tools/README.md ツール名変更と Recently Done の使い方/出力形式を追記
AGENTS.md モジュール名の表記更新
.github/workflows/linear-tools.yml CI対象パス/表示名を linear-tools に更新
.github/renovate.json5 Renovate の対象パス/グループ名を linear-tools に更新
.github/copilot-instructions.md ツール名・利用手順(Recently Done 追加)に合わせて更新

Comment on lines +51 to +53
if (import.meta.url === `file://${process.argv[1]}`) {
main();
}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm fetch:recently-donetsx src/fetch-recently-done.ts のように相対パスで起動されるため、import.meta.url(絶対file URL)と file://${process.argv[1]}(相対っぽいURL) が一致せず main() が実行されない可能性が高いです。fileURLToPath(import.meta.url)path.resolve(process.argv[1]) を比較する(または pathToFileURL を使って argv[1] を正規化する)方式に変更してください。

Copilot uses AI. Check for mistakes.
tasks: Task[],
days: number,
now = new Date()
): Task[] {
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filterTasksCompletedWithinDays が export されている一方で、days <= 0NaN のときに暗黙に「常に空配列」になりやすい挙動です(windowMs が 0/負になるため)。APIとしては days を正の整数に制約し、条件を満たさない場合は例外を投げる/明示的にエラーにする/関数コメントで仕様を明記する、のいずれかに寄せるのがおすすめです。

Suggested change
): Task[] {
): Task[] {
if (
!Number.isFinite(days) ||
!Number.isInteger(days) ||
days <= 0
) {
throw new Error(
`days must be a positive integer, but got: ${String(days)}`
);
}

Copilot uses AI. Check for mistakes.
Comment on lines +56 to +58
if (tasks.length === 0) {
return `# Linear Recently Done Tasks (Last ${days} Days)\n\nNo tasks found.\n`;
}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

追加関数に分岐があるものの、テストで未カバーの経路があります。具体的に、(1) formatRecentlyDoneTasksToMarkdown([]) の空配列ケース、(2) formatRecentlyDoneTasksToMarkdowncompletedAt: null のときに Unknown になるケース、(3) normalizeCompletedAt の不正値(invalid date文字列等)が null になるケースを Vitest で追加すると回帰を防げます。

Copilot generated this review using guidance from repository custom instructions.
@uta8a uta8a merged commit fbd7a9c into main Feb 11, 2026
4 checks passed
@uta8a uta8a deleted the feat/rename-to-linear-tools branch February 11, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant