summaryrefslogtreecommitdiff
path: root/lib/jive/pull_request.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-02-10 14:47:47 -0700
committermo khan <mo@mokhan.ca>2025-02-10 14:47:47 -0700
commitb2bf2e20fe0bd813e17e311fe1df67483f4b192b (patch)
tree041455ae7fc3d09482dee7b6a3b0de12bdff31e1 /lib/jive/pull_request.rb
parent5f6131b49c3d559ea717e401accd15f8c2193e2f (diff)
Merge code from gem because the git history is lostHEADmain
Diffstat (limited to 'lib/jive/pull_request.rb')
-rw-r--r--lib/jive/pull_request.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/jive/pull_request.rb b/lib/jive/pull_request.rb
index 060436c..06d6f41 100644
--- a/lib/jive/pull_request.rb
+++ b/lib/jive/pull_request.rb
@@ -4,9 +4,8 @@ module Jive
class PullRequest
attr_reader :dir, :uri
- def initialize(url)
- @uri = URI.parse(url)
- @dir = Pathname(Dir.home).join(".jive").join(uri.host).join(uri.path[1..-1])
+ def initialize(repo: Repo.current)
+ @dir = Jive.home.join(repo.uri.host).join(repo.branch)
Jive.shell.execute([:mkdir, "-p", @dir]) unless @dir.exist?
end
@@ -17,7 +16,7 @@ module Jive
private
def template
- Jive.root.join("lib/jive/templates/pull_request_template.md")
+ Jive.root.join("lib/jive/templates/pull_request.md")
end
def readme