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

Add Go URL to dependency badge #91

Open
MichaelCurrin opened this issue Feb 15, 2021 · 2 comments
Open

Add Go URL to dependency badge #91

MichaelCurrin opened this issue Feb 15, 2021 · 2 comments

Comments

@MichaelCurrin
Copy link
Owner

MichaelCurrin commented Feb 15, 2021

@MichaelCurrin
Copy link
Owner Author

New logic is needed to use the last part for the dependency name, or the last two parts, but exclude GitHub, even though it won't always be there

Sample

  it("returns a static badge for a Go package", () => {
    const imageTarget = "https://img.shields.io/badge/dependency-githubv4-blue";
    const linkTarget = "https://pkg.go.dev/github.com/shurcooL/githubv4";

    expect(dependency("githubv4", REGISTRY.Go, {})).toBe(
      `[![dependency - githubv4](${imageTarget})](${linkTarget})`
    );
  });

@MichaelCurrin
Copy link
Owner Author

This will be an extra option on the Packages screen and can use dependency function. Or a new function to keep that one light.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant