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

I can't round-trip a hash/patchid

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api, cli

调研方向

从入口点 pwclient info -h 732e487978cd2af56aaad959cae1a772448ddfed 开始,并将其 REST 请求与 pwclient info 34317 进行比较。检查 project 参数是如何选择和传递的;对于所示的 Patchwork 配置,哈希查找能够成功往返且不需要无效的 project 值,即表示完成。

由索引模型根据 Issue 内容生成。

描述

I appear to be unable to correctly round-trip a patch ID to hash and back again.

Using this patchwork server: https://patchwork.yoctoproject.org/project/oe-core/ and this fragment in my .pwclientrc:

[options]
default = oe-core

[oe-core]
backend = rest
url = https://patchwork.yoctoproject.org/api
token = xxx

I can request the info for a specific patch ID:

$ pwclient info 34317
Information for patch id 34317
------------------------------
- archived      : False
- commit_ref    :
- date          : 2023-11-11T18:44:32
- delegate      :
- delegate_id   :
- filename      :
- hash          : 732e487978cd2af56aaad959cae1a772448ddfed
- id            : 34317
- msgid         : <[email protected]>
- name          : libsoup: Upgrade to 3.4.2 -> 3.4.4
- project       : OpenEmbedded Core Layer
- project_id    : 6
- state         : new
- state_id      :
- submitter     : Khem Raj <[email protected]>
- submitter_id  : 10

But if I try and look up the hash:

$ pwclient info -h 732e487978cd2af56aaad959cae1a772448ddfed
No patch has the hash provided

It's the enforced project argument which is causing this, and I can't figure out what project it's expecting. Neither oe-core, 6, or OpenEmbedded Core Layer are accepted, but if I delete the project argument from the API call entirely then the call succeeds.

I suspect I'm missing something obvious?

主要语言
Python
星标
55
派生
26
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

getpatchwork/pwclient 的其他 Issue

查看 getpatchwork/pwclient 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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