Improve error message when Milestone does not exist in redmine.
まだ誰も着手していません。
評価
調査の方向性
Start in .github/workflows/scripts/release.py, especially validate_and_update_redmine_data at lines 61-66, and read the traceback to understand the missing-milestone path. Confirm the behavior when redmine_issue.fixed_version is unavailable. Done means the script reports "Couldn't find milestone x.y.z" instead of producing the ResourceAttrError and UnboundLocalError traceback.
索引モデルが issue の本文から書いたものです。
説明
Instead of producing a traceback like below, a proper error message should state "Couldn't find milestone x.y.z".
Repo path: /home/runner/work/pulp-certguard/pulp-certguard
Traceback (most recent call last):
File ".github/workflows/scripts/release.py", line 61, in validate_and_update_redmine_data
issue_milestone = redmine_issue.fixed_version
File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/redminelib/resources/standard.py", line 152, in __getattr__
return super(Issue, self).__getattr__(attr)
File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/redminelib/resources/base.py", line 197, in __getattr__
raise exceptions.ResourceAttrError
redminelib.exceptions.ResourceAttrError: Resource doesn't have the requested attribute
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".github/workflows/scripts/release.py", line 288, in <module>
release_commit_sha = create_release_commits(repo, release_version, plugin_path)
File ".github/workflows/scripts/release.py", line 132, in create_release_commits
redmine_final_query, issues_to_close, release_version
File ".github/workflows/scripts/release.py", line 66, in validate_and_update_redmine_data
redmine.issue.update(redmine_issue.id, fixed_version_id=milestone.id)
UnboundLocalError: local variable 'milestone' referenced before assignment```
- 主要言語
- Python
- スター
- 10
- フォーク
- 40
- 平均マージ
- 8時間 59分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pulp/plugin_template のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
pulp/plugin_template#724 · コメント 1 件 ·
-
stale
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
pulp/plugin_template#444 · コメント 1 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
pulp/plugin_template#1040 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
pulp/plugin_template#1027 · コメント 4 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
pulp/plugin_template#973 ·
pulp/plugin_template の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
instance instance add
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
searxng/searx-instances#941 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
FluidNumerics/fluid-walk-blocker#89 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信