Repository navigation
タスクへタグを足す・外す一括のメソッドを追加する - #293
Merged
Merged
Conversation
API の1回あたりの上限(5,000件)を超えるタスクIDは、SDK の中で分けて送る。
APIは実際にタグが付いた・外れたタスクの数を updatedTaskCount で返すようになったため、読むキーを変え、docstring と README の説明も合わせた。あわせてタグ名の140文字上限を記載した。
どの回にも同じ件数を返していたため、1件だけ送った回にも2件が返る実際には起きない状態になっていた。回ごとの件数を足していることが読めるよう、既に付いているタスクを含む現実的な返り値にした。
soymd
marked this pull request as ready for review
October 15, 2026 06:09
daisuke-miyazoe
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
多数のタスクにタグを足す・外すメソッドを追加しました。
今の SDK でタグを一括で付けるには、タスクごとに今のタグを取ってから
update_taskで丸ごと置き換えるしかありません。件数が多いと時間がかかり、置き換えなので他のタグを消すおそれもあります。またupdate_taskはtagsが空だと送らないので、タグを全部外すこともできません。API 側に追加する「足す・外す」だけの一括操作(fastlabel/fastlabel-application#11949)を呼ぶメソッドを用意しました。対応内容
add_task_tagsとremove_task_tagsを追加した。プロジェクトの slug、タスクIDの一覧、タグ名の一覧を受け取り、実際にタグが付いた・外れたタスクの件数を返す。すでに付いていた(外す場合は付いていなかった)タスクは数えないので、再実行すると 0 になるAPI 側(fastlabel/fastlabel-application#11949)のリリース後にマージします。
Closes fastlabel/fastlabel-application#11948
動作確認
add_task_tagsを呼ぶと、既に付いていた10件を除いた 4,990 が返り、5,000件すべてにタグが付くremove_task_tagsも同じ)remove_task_tagsを呼ぶと、2,000・2,000・1,000件の3回に分かれ、合計の 5,000 が返る。タグの紐付けは外れ、タグ自体は残るwork in fastlabel-application