Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add renovate config for goimports #185

Closed
wants to merge 1 commit into from

Conversation

frezbo
Copy link
Contributor

@frezbo frezbo commented Jul 28, 2022

Add renovate config for goimports

Ref: aquaproj/aqua-registry#5145

Signed-off-by: Noel Georgi [email protected]

Add renovate config for goimports

Ref: aquaproj/aqua-registry#5145

Signed-off-by: Noel Georgi <[email protected]>
@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Jul 28, 2022

Thank you for your contribution.

I expect goimports should be updated by this rule.

{
"fileMatch": ["\\.?aqua\\.ya?ml"],
"matchStrings": [
" +['\"]?(version|ref)['\"]? *: +['\"]?(?<currentValue>[^'\" \\n]+?)['\"]? +# renovate: depName=(?<depName>[^\\n]+)",
" +['\"]?name['\"]? *: +['\"]?(?<depName>[^\\n]+)*@(?<currentValue>[^'\" \\n]+)['\"]?"
],
"datasourceTemplate": "go"
}

But it seems not to work as expected. 🤔
I don't know why Renovate doesn't create a pull request.
I'll take a look.

suzuki-shunsuke/test-renovate#106

image

https://app.renovatebot.com/dashboard#github/suzuki-shunsuke/test-renovate/754264919

{
        "packageFile": "aqua.yaml",
        "deps": [
          {
            "depName": "golang.org/x/tools/cmd/goimports",
            "currentValue": "v0.1.10",
            "datasource": "go",
            "replaceString": " name: golang.org/x/tools/cmd/[email protected]",
            "depIndex": 0,
            "warnings": [],
            "versioning": "semver",
            "sourceUrl": "https://github.com/golang/tools",
            "updates": []
          }
        ],
        "matchStrings": [
          " +['\"]?(version|ref)['\"]? *: +['\"]?(?<currentValue>[^'\" \\n]+?)['\"]? +# renovate: depName=(?<depName>[^\\n]+)",
          " +['\"]?name['\"]? *: +['\"]?(?<depName>[^\\n]+)*@(?<currentValue>[^'\" \\n]+)['\"]?"
        ],
        "datasourceTemplate": "go"
      }

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Jul 28, 2022

For example, golang.org/x/tools/gopls was updated properly.

So I expect golang.org/x/tools/cmd/goimports is also updated.

@frezbo
Copy link
Contributor Author

frezbo commented Jul 29, 2022

But it seems not to work as expected. thinking
I don't know why Renovate doesn't create a pull request.

That's exactly what I saw too, renovate didn't do a PR (I didn't spend much time figuring it out, thought it was because it had issues with go projects having multiple tags)

@frezbo frezbo mentioned this pull request Aug 3, 2022
@frezbo
Copy link
Contributor Author

frezbo commented Aug 11, 2022

closing since we might have a better solution as per discussion in #191

@frezbo frezbo closed this Aug 11, 2022
@frezbo frezbo deleted the chore/renovate-config-goimports branch August 11, 2022 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants