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
环境准备
从这里开始
- 先读完整个 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 status/needs-triage
难度 2/5 1-3 小时 新手友好度 86/100
prowler-cloud/prowler#12887 · 1 条评论 ·
维护者通常 1 天内回复
-
area: desktop platform: macos priority: p3 status: ready type: enhancement
难度 1/5 1 小时以内 新手友好度 92/100
use-agent-os/agent-os#3484 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
open-telemetry/opentelemetry-python-contrib#5113 · 2 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
external
难度 2/5 1-3 小时 新手友好度 68/100
langchain-ai/docs#6255 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复