Improve error message when Milestone does not exist in redmine.
還沒有人認領這個 Issue。
評估
研究方向
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 分鐘
- 30 天內合併 PR
- 5
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 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 個 reaction ·
-
難度 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 天內回覆