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

Update dependabot.yml #437

Merged
merged 3 commits into from
Apr 4, 2022
Merged

Update dependabot.yml #437

merged 3 commits into from
Apr 4, 2022

Conversation

pellared
Copy link
Member

@pellared pellared commented Apr 4, 2022

Why

Per #356 (comment)

What

Fixes following issues

image

image

image

Changes proposed in this pull request:

  • Remove the nuget for directories that only contain the Directory.Build.props file
  • Increase the "open PR limit"
  • Do not set label manually (dependabot set it by its own if it is seft unset)
  • Add all directories containing *.csproj

Probably we should use the generated PRs only for sake of "tracking". Thanks to it we are notified about new versions. After we create PRs like #436 we can then check if the PRs are automatically closed.

Some of them we can close manually if we do not want to bump the dependency.

A similar approach is used in https://github.com/open-telemetry/opentelemetry-go and https://github.com/open-telemetry/opentelemetry-go-contrib. The only issue is that it generates a lot of spam GitHub notifications...

Testing

Check https://github.com/pellared/opentelemetry-dotnet-instrumentation-dependabot/pulls

Generating dependabot

I executed find . -type f -name '*.csproj' | sed -r 's|/[^/]+$||' | sort | uniq to all directories containing *.csproj.

Then I have written a little Go program to generate the yml file

package main

import (
	"log"
	"os"
	"text/template"
)

func main() {
	const tplt = `
version: 2
updates:

  - package-ecosystem: github-actions
    directory: /
    schedule:
      day: sunday
      interval: weekly

{{range .}} 
  - package-ecosystem: nuget
    directory: {{.}}
    schedule:
      day: sunday
      interval: weekly
    open-pull-requests-limit: 20
{{end}}
`

	folders := []string{
		"/build/nuke",
		"/examples/AspNetCoreMvc",
		"/examples/BindingRedirect",
		"/examples/ConsoleApp",
		"/examples/ConsoleApp.SelfBootstrap",
		"/examples/CoreAppOldReference",
		"/examples/OldReference",
		"/examples/OpenTracingLibrary",
		"/examples/Vendor.Distro",
		"/src/OpenTelemetry.AutoInstrumentation",
		"/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps",
		"/src/OpenTelemetry.AutoInstrumentation.Core",
		"/src/OpenTelemetry.AutoInstrumentation.Loader",
		"/src/OpenTelemetry.AutoInstrumentation.StartupHook",
		"/test/integration-tests/aspnet/IntegrationTests.AspNet",
		"/test/integration-tests/IntegrationTests.GraphQL",
		"/test/integration-tests/IntegrationTests.Helpers",
		"/test/integration-tests/IntegrationTests.MongoDB",
		"/test/integration-tests/IntegrationTests.StartupHook",
		"/test/OpenTelemetry.AutoInstrumentation.Bootstrapping.Tests",
		"/test/OpenTelemetry.AutoInstrumentation.Loader.Tests",
		"/test/OpenTelemetry.AutoInstrumentation.Tests",
		"/test/test-applications/integrations/aspnet/Samples.AspNet",
		"/test/test-applications/integrations/dependency-libs/Samples.ExampleLibrary",
		"/test/test-applications/integrations/dependency-libs/Samples.ExampleLibraryTracer",
		"/test/test-applications/integrations/Samples.GraphQL",
		"/test/test-applications/integrations/Samples.MongoDB",
		"/test/test-applications/integrations/Samples.StartupHook",
		"/test/test-applications/mocks/OpenTelemetry.AutoInstrumentation.Mock",
	}

	t := template.Must(template.New("letter").Parse(tplt))
	if err := t.Execute(os.Stdout, folders); err != nil {
		log.Fatalln("executing template:", err)
	}
}

Probably we could make a Nuke target that does it instead.

@pellared pellared marked this pull request as ready for review April 4, 2022 10:32
@pellared pellared requested a review from a team April 4, 2022 10:32
@pellared pellared changed the title [WIP] Update dependabot.yml Update dependabot.yml Apr 4, 2022
Copy link
Member

@nrcventura nrcventura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for detailing the process that you used!

@nrcventura nrcventura merged commit 24e9a09 into main Apr 4, 2022
@nrcventura nrcventura deleted the refine-dependabot branch April 4, 2022 17:43
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.

3 participants