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 alphanumeric param to AutolinkOptions #2450

Merged
merged 7 commits into from Sep 5, 2022
Merged

Add alphanumeric param to AutolinkOptions #2450

merged 7 commits into from Sep 5, 2022

Conversation

douglascayers
Copy link
Contributor

Summary

Resolves #2449

Changes

  • Adds IsAlphanumeric param to AutolinkOptions and Autolink structs of github/repos_autolinks.go
  • Adds unit and integration tests for creating and getting autolinks for a repo
  • Updates the createRandomTestRepository function in test/integration/github_test.go to look up the owner to create the repo under if a name isn't specified explicitly. Checks GITHUB_OWNER env var else falls back to user the oauth token belongs to.
  • Removes redundant env var check from init function of test/integration/github_test.go because those checks already occur in the test/integration/authorizations_test.go file as needed. This made it easier for me to run integrations tests without setting env vars that weren't needed.

Tests

  • github/repos_autolinks_test.go
  • test/integration/repos_test.go

Created an alphanumeric autolink

image

Created a numeric autolink

image

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #2450 (7e9fa62) into master (af69917) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2450   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         122      122           
  Lines       10690    10690           
=======================================
  Hits        10480    10480           
  Misses        144      144           
  Partials       66       66           
Impacted Files Coverage Δ
github/repos_autolinks.go 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@gmlewis gmlewis 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 very much, @douglascayers !
Looks great to me.

Awaiting second LGTM from any other contributor to this repo before merging.

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Sep 1, 2022
@douglascayers
Copy link
Contributor Author

Hi @alexal, as a contributor to the autolinks feature, I'd appreciate your review of my proposed changes. Thanks!

Copy link
Contributor

@raynigon raynigon left a comment

Choose a reason for hiding this comment

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

LGTM

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Sep 5, 2022
@gmlewis
Copy link
Collaborator

gmlewis commented Sep 5, 2022

Thank you, @raynigon !
Merging.

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.

Support Autolinks with alphanumeric or numeric IDs
3 participants