[前][次][番号順一覧][スレッド一覧]

ruby-changes:69433

From: David <ko1@a...>
Date: Mon, 25 Oct 2021 20:55:15 +0900 (JST)
Subject: [ruby-changes:69433] 9fbf3a1f6f (master): Unify issue template and ISSUES.md document

https://git.ruby-lang.org/ruby.git/commit/?id=9fbf3a1f6f

From 9fbf3a1f6fbe75fb971692469fb708c9b6ae6c2e Mon Sep 17 00:00:00 2001
From: David Rodriguez <deivid.rodriguez@r...>
Date: Mon, 11 Oct 2021 15:42:39 +0200
Subject: Unify issue template and ISSUES.md document

Some crucial information to ease maintainers work, like the advice of
upgrading rubygems and bundler, was one step away from the issue
template, making it easier for some users to miss.

Now all relevant information is written directly in the bug report
template.
---
 lib/bundler/cli/issue.rb       |  7 ++++---
 lib/bundler/friendly_errors.rb | 35 +++++------------------------------
 2 files changed, 9 insertions(+), 33 deletions(-)

diff --git a/lib/bundler/cli/issue.rb b/lib/bundler/cli/issue.rb
index f4cd5ac4df6..b891ecb1d2b 100644
--- a/lib/bundler/cli/issue.rb
+++ b/lib/bundler/cli/issue.rb
@@ -20,9 +20,10 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/issue.rb#L20
 
         Hopefully the troubleshooting steps above resolved your problem!  If things
         still aren't working the way you expect them to, please let us know so
-        that we can diagnose and help fix the problem you're having. Please
-        view the Filing Issues guide for more information:
-        https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md
+        that we can diagnose and help fix the problem you're having, by filling
+        in the new issue form located at
+        https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md,
+        and copy and pasting the information below.
 
       EOS
 
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index db43e0f6549..cc615db60ca 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -63,34 +63,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/friendly_errors.rb#L63
     def request_issue_report_for(e)
       Bundler.ui.error <<-EOS.gsub(/^ {8}/, ""), nil, nil
         --- ERROR REPORT TEMPLATE -------------------------------------------------------
-        # Error Report
-
-        ## Questions
-
-        Please fill out answers to these questions, it'll help us figure out
-        why things are going wrong.
-
-        - **What did you do?**
-
-          I ran the command `#{$PROGRAM_NAME} #{ARGV.join(" ")}`
-
-        - **What did you expect to happen?**
-
-          I expected Bundler to...
-
-        - **What happened instead?**
-
-          Instead, what happened was...
-
-        - **Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?**
-
-          I tried...
-
-        - **Have you read our issues document, https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md?**
-
-          ...
-
-        ## Backtrace
 
         ```
         #{e.class}: #{e.message}
@@ -109,8 +81,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/friendly_errors.rb#L81
         First, try this link to see if there are any existing issue reports for this error:
         #{issues_url(e)}
 
-        If there aren't any reports for this error yet, please copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
-        https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md
+        If there aren't any reports for this error yet, please fill in the new issue form located at #{new_issue_url}, and copy and paste the report template above in there.
       EOS
     end
 
@@ -121,6 +92,10 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/friendly_errors.rb#L92
       "https://github.com/rubygems/rubygems/search?q=" \
         "#{CGI.escape(message)}&type=Issues"
     end
+
+    def new_issue_url
+      "https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md"
+    end
   end
 
   def self.with_friendly_errors
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]