Closed ipetkov closed 1 year ago
pub fn flake_url(&self) -> String
This function can be refactored to return a FlakeUrl
type (newtype over String
) which then impl's a method to get the attribute.
Instead of introducing a new indirection type (
FlakeRefKind
), I'd just modify thePulRequestRef
type to take an additional struct field calledanchor
. Then,PullRequest::flake_url
can construct a flake url that uses the anchor as attribute.
I've applied this feedback, let me know if you have anything else in mind!
This function can be refactored to return a
FlakeUrl
type (newtype overString
) which then impl's a method to get the attribute.
I did not apply this feedback because it resulted in having to wrap the url String
in multiple places only to unwrap it later and it did not seem like the boilerplate was adding much. But if you want this refactor done I can add it in
@ipetkov This is fine. I just realized that there is more to it than FlakeUrl
, so I'll take over this PR and merge it to mainline.
Refs https://github.com/srid/nixci/issues/2 Refs https://github.com/srid/nixci/pull/13#issuecomment-1698336854