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

[feature] Support SCP-Style Git URLs #668

Merged
merged 6 commits into from
Feb 26, 2024
Merged

[feature] Support SCP-Style Git URLs #668

merged 6 commits into from
Feb 26, 2024

Conversation

KCarretto
Copy link
Collaborator

@KCarretto KCarretto commented Feb 25, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

  • Support SCP style URLs when specifying a repo, this will enable the github ssh copy+pasta at the expense of our sanity.

  • Adds a new "last_imported_at" timestamp to the repository.

  • Update default tome naming to use metadata.yml

@KCarretto KCarretto requested a review from hulto February 25, 2024 22:16
Copy link

codecov bot commented Feb 25, 2024

Codecov Report

Attention: Patch coverage is 16.25000% with 67 lines in your changes are missing coverage. Please review.

Project coverage is 71.71%. Comparing base (1575c40) to head (0ef43cb).

Files Patch % Lines
tavern/internal/ent/schema/repository.go 13.63% 57 Missing ⚠️
tavern/tomes/git.go 18.18% 7 Missing and 2 partials ⚠️
tavern/tomes/parse.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #668      +/-   ##
==========================================
- Coverage   72.06%   71.71%   -0.35%     
==========================================
  Files         175      175              
  Lines       12017    12086      +69     
==========================================
+ Hits         8660     8668       +8     
- Misses       3143     3203      +60     
- Partials      214      215       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -149,3 +164,68 @@ func HookCreateRepoPrivateKey() ent.Hook {
})
}
}

var scpRegex = regexp.MustCompile(`^(ssh://)?([a-zA-Z0-9_]+)@([a-zA-Z0-9._-]+):([a-zA-Z0-9./._-]+)(?:\?||$)(.*)$`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

so readable 🙂

Copy link
Collaborator

@Cictrone Cictrone left a comment

Choose a reason for hiding this comment

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

death

@KCarretto
Copy link
Collaborator Author

@KCarretto KCarretto merged commit 0ebc93d into main Feb 26, 2024
6 of 8 checks passed
@KCarretto KCarretto deleted the support-scp-giturls branch February 26, 2024 00:22
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.

None yet

2 participants