Skip to content

Use commit id in source code url property of gemspec #1961

@thompson-tomo

Description

@thompson-tomo

To enable removal of the source code of packages no longer supported, it would be useful if the published gems pointed to the commit of the source code used. Ideally the file path is also set.

On looking into it we should be able to add the following:

commit = ENV["GITHUB_SHA"] || "main"

Then update the url

spec.metadata["source_code_uri"] =
"https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/#{commit}/instrumentation/ruby_kafka"

This way the commit id is used on github otherwise main is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepEnsures stale-bot keeps this issue/PR open

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions