x-motemen / git-pr-release

Release pull request generator
https://rubygems.org/gems/git-pr-release
MIT License
689 stars 76 forks source link

delegate to @pr when method_missing in PullRequest #87

Closed Songmu closed 2 years ago

Songmu commented 2 years ago

It is stressful to call out pr over and over when writing our templates as follows.

<% pull_requests.each do |pr| -%>
- #<%=  pr.pr.number %>
<% end -%>

So I resolved to use method_missing to delegate, even though it is rough.

I'm not a Ruby person, so I don't know if this is a good way. However, git-pr-release is just a tool, so I think having an easy interface like this is not a bad idea.

Songmu commented 2 years ago

Thank you. Your changes were very helpful. @onk