Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Improve error message when Milestone does not exist in redmine.

未关闭
#428 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
python
领域
release

调研方向

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 内容生成。

描述

stale

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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pulp/plugin_template 的其他 Issue

查看 pulp/plugin_template 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。