Skip to content

[35]更新が必要なパッケージ情報をIssueに起票するPIpelineの作成#409

Merged
r0227n merged 32 commits into
mainfrom
feature/35-update-package
May 15, 2025
Merged

[35]更新が必要なパッケージ情報をIssueに起票するPIpelineの作成#409
r0227n merged 32 commits into
mainfrom
feature/35-update-package

Conversation

@r0227n

@r0227n r0227n commented May 9, 2025

Copy link
Copy Markdown
Contributor

概要

dart pub outdated を実行し、パッケージの依存関係が更新が必要になった時にIssueにコメントするPipelineを作成。

Issueについて

  • package_updated というlabelが存在するIssueにコメント形式でパッケージの更新情報をコメントする
  • package_updated のlabelがついたIssueが2個以上存在する場合、失敗するようになっている

レビュー観点

  • IssueのタイトルやDescriptionは問題ないか?
  • コメントで作成される内容として適切であるか?
  • パッケージを更新しない限り、Issueないに重複したコメントが作られるが問題ないか?

レビューレベル

  • Lv1: ぱっとみて違和感がないかチェックして Approve する
  • Lv2: 仕様レベルまで理解して、仕様通りに動くかある程度検証して Approve する
  • Lv3: 実際に環境で動作確認したうえで Approve する

レビュー優先度

  • すぐに見てもらいたい ( hotfix など ) 🚀
  • 今日中に見てもらいたい 🚗
  • 今日〜明日中で見てもらいたい 🚶
  • 数日以内で見てもらいたい 🐢

画像 / 動画

N/A

Before After Design

確認したこと

正常実行完了

https://github.com/yumemi-inc/flutter-mobile-project-template/actions/runs/14923295269
#408

「package_update」が2個以上作成されたIssueの場合、強制終了する

https://github.com/yumemi-inc/flutter-mobile-project-template/actions/runs/14923515726/job/41923209042

#408
#407

2回目以降の実行でコメントが重複するかどうか

https://github.com/yumemi-inc/flutter-mobile-project-template/actions/runs/14923590555
#408 (comment)

動作確認手順

a6f19d2 の状態に戻し、pushするとActionが実行されます。

備考

コメントの内容が重複する場合、新規コメントは作成しない 方が良い場合、実装可能か再度調査します。
重複した場合、処理をスキップするようにしました。

concurrencyは今回、scheduleで実行するため不要と判断しました。

@yumemi-team-review-requester yumemi-team-review-requester Bot requested review from a team, blendthink and den0206 and removed request for a team May 9, 2025 09:18
@github-actions

github-actions Bot commented May 9, 2025

Copy link
Copy Markdown

Ready for review 🚀

@github-actions

github-actions Bot commented May 9, 2025

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit cf44bf0):

https://flutter-mobile-project-template-catalog--pr409-feature-qzhw3zgf.web.app

(expires Thu, 22 May 2025 04:58:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 9ea56735a63d07a7cfe62eb204b0528284c37c23

@den0206 den0206 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@r0227n
何点かレビューさせて頂きました!
基本的には最新のmainを反映したところ生じたエラー・ワーニングの点になります
ご確認お願いします!

Comment thread tools/model/package_info.dart Outdated
Comment thread tools/model/package_info.dart
Comment thread tools/model/package_info.dart
Comment thread tools/model/package_info.dart
Comment thread tools/update_package.dart Outdated
Comment thread tools/update_package.dart Outdated
@r0227n

r0227n commented May 14, 2025

Copy link
Copy Markdown
Contributor Author

@den0206
レビューありがとうございます。
コメントいただいた部分を修正しましたので、再レビューよろしくお願いします。

@den0206

den0206 commented May 14, 2025

Copy link
Copy Markdown
Contributor

@r0227n
対応ありがとうございます!内容はLGTM です。

ask-badge

  • パッケージを更新しない限り、Issueないに重複したコメントが作られるが問題ないか?
    上記、対応する事に結構コストかかりそうでしょうか?(ですよね)
    可能であれば、対応したいと考えています。

今のままだと、更新を行なった際に変更を加えない限り、無制限にIssueが登録されると考えており。。

@den0206 den0206 self-requested a review May 14, 2025 05:27
@r0227n

r0227n commented May 14, 2025

Copy link
Copy Markdown
Contributor Author

@den0206
gh issue view 408 --json comments を実行することでissue内のコメントを確認することができるため、低コストで実装できると思います!

対応完了後、再度レビューよろしくお願いします🙇

{
  "comments": [
    {
      "id": "IC_kwDOK5kQ_s6qygaB",
      "author": {
        "login": "github-actions"
      },
      "authorAssociation": "NONE",
      "body": "## Update package\n| package | current | resolvable |\n| :---    | :---    | :---       |\n  | build_runner | 2.4.14 | 2.4.15 | \n| dio | 5.7.0 | 5.8.0+1 | \n| flutter_gen_runner | 5.8.0 | 5.10.0 | \n| flutter_hooks | 0.20.5 | 0.21.2 | \n| flutter_launcher_icons | 0.14.2 | 0.14.3 | \n| flutter_markdown | 0.7.5 | 0.7.7+1 | \n| go_router | 14.6.3 | 15.1.2 | \n| go_router_builder | 2.7.3 | 2.9.0 | \n| package_info_plus | 8.1.2 | 8.3.0 | \n| shared_preferences | 2.3.5 | 2.5.3 | \n| widgetbook | 3.10.2 | 3.13.1 | \n| widgetbook_annotation | 3.2.0 | 3.4.0 | \n| widgetbook_generator | 3.9.1 | 3.12.0 | \n| yumemi_lints | 3.1.0 | 4.0.0 |\n",
      "createdAt": "2025-05-09T06:57:42Z",
      "includesCreatedEdit": false,
      "isMinimized": false,
      "minimizedReason": "",
      "reactionGroups": [],
      "url": "https://github.com/yumemi-inc/flutter-mobile-project-template/issues/408#issuecomment-2865366657",
      "viewerDidAuthor": false
    },
    {
      "id": "IC_kwDOK5kQ_s6qytLG",
      "author": {
        "login": "github-actions"
      },
      "authorAssociation": "NONE",
      "body": "## Update package\n| package | current | resolvable |\n| :---    | :---    | :---       |\n  | build_runner | 2.4.14 | 2.4.15 | \n| dio | 5.7.0 | 5.8.0+1 | \n| flutter_gen_runner | 5.8.0 | 5.10.0 | \n| flutter_hooks | 0.20.5 | 0.21.2 | \n| flutter_launcher_icons | 0.14.2 | 0.14.3 | \n| flutter_markdown | 0.7.5 | 0.7.7+1 | \n| go_router | 14.6.3 | 15.1.2 | \n| go_router_builder | 2.7.3 | 2.9.0 | \n| package_info_plus | 8.1.2 | 8.3.0 | \n| shared_preferences | 2.3.5 | 2.5.3 | \n| widgetbook | 3.10.2 | 3.13.1 | \n| widgetbook_annotation | 3.2.0 | 3.4.0 | \n| widgetbook_generator | 3.9.1 | 3.12.0 | \n| yumemi_lints | 3.1.0 | 4.0.0 |\n",
      "createdAt": "2025-05-09T07:16:51Z",
      "includesCreatedEdit": false,
      "isMinimized": false,
      "minimizedReason": "",
      "reactionGroups": [],
      "url": "https://github.com/yumemi-inc/flutter-mobile-project-template/issues/408#issuecomment-2865418950",
      "viewerDidAuthor": false
    }
  ]

@r0227n r0227n marked this pull request as draft May 14, 2025 06:15
auto-merge was automatically disabled May 14, 2025 06:15

Pull request was converted to draft

@r0227n

r0227n commented May 15, 2025

Copy link
Copy Markdown
Contributor Author

動作確認

package_updateラベルのIssueが存在しない場合、新規Issue起票

image

最新の既存コメントと追加しようとしているコメントが重複している場合、スキップ

  • 実行履歴
  • 想定された動作: 処理自体は正常終了するが、コメントは追加されない
image

package_updateラベルが2個以上設定されているIssueが存在する

  • 実行履歴
  • 想定された動作: 異状終了する(ラベルが重複している場合、異状終了する設計)
#408 #448
image image

@r0227n r0227n marked this pull request as ready for review May 15, 2025 02:11
@github-actions

Copy link
Copy Markdown

Ready for review 🚀

@r0227n

r0227n commented May 15, 2025

Copy link
Copy Markdown
Contributor Author

@den0206
コメントの内容が重複していた場合、新規コメント追加処理をスキップするようにしました。
お手隙の際に再レビューよろしくお願いします。

動作確認の方法

https://github.com/yumemi-inc/flutter-mobile-project-template/actions/runs/15034752820
上記にアクセスし、「Re-run jobs」を実行すると66bfebaの状態の内容で動作確認可能です。

https://github.com/yumemi-inc/flutter-mobile-project-template/labels/package_update のラベルを追加したり、削除・コメントの削除などで動作確認可能となります。

動作確認内容

#409 (comment)

Comment on lines +82 to +85
if [[ "$package_comment" == "$latest_comment" ]]; then
echo "The latest comment is the same as the current comment"
exit 0
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

❤️

@den0206 den0206 self-requested a review May 15, 2025 04:40

@den0206 den0206 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@r0227n
LGTMです!ご対応ありがとうございます
念の為、最新に更新しマージしてください🙇

@r0227n r0227n enabled auto-merge May 15, 2025 04:57
@r0227n r0227n merged commit 069fc1c into main May 15, 2025
@r0227n r0227n deleted the feature/35-update-package branch May 15, 2025 05:00
@r0227n r0227n mentioned this pull request May 15, 2025
7 tasks
@den0206 den0206 mentioned this pull request May 26, 2025
8 tasks
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.

パッケージ更新されたら Issue 作成する仕組み導入

2 participants