【问题标题】:Dependabot does not find latest commitDependabot 没有找到最新的提交
【发布时间】:2021-09-28 16:07:41
【问题描述】:

我正在探索 Dependabot 的工作原理,但它并没有像我预期的那样工作。

我创建了 2 个 私人 Golang 存储库(onetwo),其中 one 取决于 two

onego.mod

module github.com/dazwilkin/one

go 1.17

require github.com/dazwilkin/two v0.0.0-20210927170438-e7aa41e4107b

注意 e7aa41e4107b 是为了检查 VS Code 和 Dependabot 的更新检查而故意预先提交的。

还有dependabot.yml:

version: 2
updates:
  - package-ecosystem: "gomod"
    directory: "/"
    schedule:
      interval: "daily"

two 最近的 2 次提交是:

curl \
--silent \
--header "Authorization: Bearer ${TOKEN}" \
https://api.github.com/repos/${OWNER}/${REPO}/commits \
| jq -r '.[]|{"sha":.sha,"date":.commit.committer.date}'

还有:

{
  "sha": "b2f2074829aa61218d7e38f27bb6051ccd97ab7a",
  "date": "2021-09-27T18:03:33Z"
}
{
  "sha": "e7aa41e4107b8c28f99cadfe55b831380730e808",
  "date": "2021-09-27T17:04:38Z"
}

注意 b2f2074829aa 是我希望被告知的提交,e7aa41e4107bone 继续引用的 two 上的先前提交。

VS Code 很快确定有更新可用,并且:

go list -m -u all

github.com/dazwilkin/one
github.com/dazwilkin/two v0.0.0-20210927170438-e7aa41e4107b [v0.0.0-20210927180333-b2f2074829aa]

注意正确识别最新提交 (b2f2074829aa) 以替换先前提交 (e7aa41e4107b)

但是,在 22 小时和反复强制更新之后,dependabot 继续报告 e7aa41e4107b 是最新的:

updater | INFO <job_214390230> Starting job processing
updater | INFO <job_214390230> Starting update job for DazWilkin/one
updater | INFO <job_214390230> Checking if github.com/dazwilkin/two 0.0.0-20210927170438-e7aa41e4107b needs updating
updater | INFO <job_214390230> Latest version is 0.0.0-20210927170438-e7aa41e4107b
updater | INFO <job_214390230> No update needed for github.com/dazwilkin/two 0.0.0-20210927170438-e7aa41e4107b
updater | INFO <job_214390230> Finished job processing

注意 Dependabot 访问 github.com/dazwilkin/two 似乎没有问题,但它没有找到最近的提交。

这只是一个最终的一致性问题,我需要等待更长时间吗?

更新我又等了 24 小时,它继续发现较早的提交为 latest version

还是我误解或错误配置了 Dependabot?

一个可能相关的问题是我的 GitHub 帐户是混合大小写的 DazWilkin,但为简单起见,我使用全小写 (github.com/dazwilkin) 发布和引用 Golang 模块。但是 Dependabot 似乎没有问题找到先前的提交。

【问题讨论】:

    标签: github dependabot


    【解决方案1】:

    我相信这是因为dependabot 不支持伪版本 - https://github.com/dependabot/dependabot-core/issues/3017

    【讨论】:

    • 啊哈!是的,我想就是这样,谢谢!
    猜你喜欢
    • 2011-10-20
    • 1970-01-01
    • 2018-07-29
    • 2011-04-22
    • 1970-01-01
    • 2021-11-11
    • 1970-01-01
    • 2011-06-14
    • 1970-01-01
    相关资源
    最近更新 更多