Daniel Shahaf wrote on Sat, Dec 03, 2016 at 09:48:35 +0000:
> Paul Wise wrote on Sat, Dec 03, 2016 at 10:02:17 +0800:
> > On Fri, 2016-12-02 at 09:04 +0000, Daniel Shahaf wrote:
> > 
> > > I've gone ahead and drafted patches for both hcih and udd. 
> > 
> > You also need a patch that contains the results of regenerating the
> > manual page from its source, since hcih authors explicitly rejected
> > doing proper builds of the manual page from source at build time.
> 
> […]

Here's a revised patch.

hcih-helptag-v2.diff is v1 with not only the *.1.txt but also the *.1
files modified.  I edited the *.1 file by hand since that was easier
than figuring out what dependencies I was missing for re-generating it
using a2x(1).

udd-helptag-v2.diff is identical to v1, included here for self-containedness.

Thanks for the review.

Cheers,

Daniel
diff --git a/scripts/generate-how-can-i-help b/scripts/generate-how-can-i-help
index 28a5713..eb608c6 100755
--- a/scripts/generate-how-can-i-help
+++ b/scripts/generate-how-can-i-help
@@ -83,6 +83,19 @@ dbget("select id, source, package, title from bugs where (id in (select id from
   }
 end
 
+dbget("select id, source, package, title from bugs where (id in (select id from bugs_tags where tag='help')) and status != 'done';").each do |r|
+  hash = Digest::MD5.hexdigest("help-tag #{r['id']}")
+  helpitems << {
+    'type' => 'help-tag',
+    'hash' => hash,
+    'source' => r['source'],
+    'package' => r['package'],
+    'bug' => r['id'],
+    'title' => r['title'].force_ascii,
+    'pseudo-package' => pseudopkg.include?(r['package'])
+  }
+end
+
 dbget("""select distinct packages_summary.source, package, sync
       from packages_summary, migrations where distribution='debian' and release='sid'
       and package not in (select package from packages_summary where distribution='debian' and release='stretch')
diff --git a/bin/how-can-i-help b/bin/how-can-i-help
index cc0b1a1..ee04feb 100755
--- a/bin/how-can-i-help
+++ b/bin/how-can-i-help
@@ -46,7 +46,7 @@ optparse = OptionParser.new do |opts|
   opts.on('-h', '--help', 'show help') do
     puts opts
     puts "\nAllowed types for '--show' option (see manual for more information):"
-    puts "\twnpp, newcomer, no-testing, testing-autorm, rfs, O, RFA, RFH, ITA, pseudo-package"
+    puts "\twnpp, newcomer, help-tag, no-testing, testing-autorm, rfs, O, RFA, RFH, ITA, pseudo-package"
     puts "\nTo see opportunities suitable for newcomers you should run how-can-i-help as:"
     puts "\thow-can-i-help --old --show newcomer"
     puts "\nYou can check manual for a more detailed description:"
@@ -207,6 +207,10 @@ helpitems.each do |hi|
     if packages.include?(hi['package']) || (hi['pseudo-package'] == true && !ignored_types.include?('pseudo-package'))
       helpitems_filtered << hi
     end
+  elsif hi['type'] == 'help-tag'
+    if packages.include?(hi['package'])
+      helpitems_filtered << hi
+    end
   elsif hi['type'] == 'no-testing'
     if packages.include?(hi['package'])
       helpitems_filtered << hi
@@ -238,6 +242,7 @@ unless $kas
   wnpp = helpitems_filtered.select { |e| e['type'] == 'wnpp' }
   gift = helpitems_filtered.select { |e| e['type'] == 'gift' && e['pseudo-package'] != true }
   infra = helpitems_filtered.select { |e| e['type'] == 'gift' && e['pseudo-package'] == true }
+  help_tag = helpitems_filtered.select { |e| e['type'] == 'help-tag' }
   notesting = helpitems_filtered.select { |e| e['type'] == 'no-testing' }
   autoremoval = helpitems_filtered.select { |e| e['type'] == 'testing-autorm' }
   rfs = helpitems_filtered.select { |e| e['type'] == 'rfs' }
@@ -282,6 +287,14 @@ unless $kas
     puts
   end
 
+  if help_tag.length > 0
+    puts $old ? 'Bugs where assistance is requested (tagged \'help\'):' : 'New bugs where assistance is requested (tagged \'help\'):'
+    help_tag.sort_by { |r| [r['package'], r['bug']] }.each do |r|
+      puts " - #{r['package']} - https://bugs.debian.org/#{r['bug']} - #{r['title']}"
+    end
+    puts
+  end
+
   if infra.length > 0
     puts $old ? 'Bugs affecting Debian infrastructure (tagged \'newcomer\'):' : 'New bugs affecting Debian infrastructure (tagged \'newcomer\'):'
     infra.sort_by { |r| [r['package'], r['bug']] }.each do |r|
diff --git a/how-can-i-help.1 b/how-can-i-help.1
index e48159f..c79cab5 100644
--- a/how-can-i-help.1
+++ b/how-can-i-help.1
@@ -137,7 +137,7 @@ how\-can\-i\-help \-\-old \-\-show newcomer
 .RE
 .\}
 .sp
-The following types can be used: wnpp, newcomer, no\-testing, testing\-autorm, rfs
+The following types can be used: wnpp, help\-tag, newcomer, no\-testing, testing\-autorm, rfs
 .sp
 Specific WNPP types: O, RFA, RFH, ITA
 .sp
@@ -146,7 +146,7 @@ And special types: pseudo\-package
 .sp
 \fBhow\-can\-i\-help\fR can also ignore selected types of opportunities\&. These are listed in ~/\&.config/how\-can\-i\-help/ignored separated by whitespaces or newlines\&.
 .sp
-Allowed types: wnpp, newcomer, no\-testing, testing\-autorm, rfs
+Allowed types: wnpp, help\-tag, newcomer, no\-testing, testing\-autorm, rfs
 .sp
 Allowed WNPP types: O, RFA, RFH, ITA
 .sp
@@ -161,6 +161,8 @@ The following acronyms are used to describe the supported types:
 .sp
 \fBnewcomer\fR Bugs tagged with the \fInewcomer\fR tag\&. Those bugs were formerly tagged with the now deprecated \fIgift\fR tag\&.
 .sp
+\fBhelp\-tag\fR Bugs tagged with the \fIhelp\fR tag\&.
+.sp
 \fBno\-testing\fR Packages removed from Debian \fItesting\fR\&.
 .sp
 \fBtesting\-autorm\fR Packages going to be removed from Debian \fItesting\fR\&.
diff --git a/how-can-i-help.1.txt b/how-can-i-help.1.txt
index e1055e2..a1e07f4 100644
--- a/how-can-i-help.1.txt
+++ b/how-can-i-help.1.txt
@@ -96,7 +96,7 @@ how-can-i-help --old --show newcomer
 -----
 
 The following types can be used:
-wnpp, newcomer, no-testing, testing-autorm, rfs
+wnpp, help-tag, newcomer, no-testing, testing-autorm, rfs
 
 Specific WNPP types:
 O, RFA, RFH, ITA
@@ -110,7 +110,7 @@ IGNORE SELECTED TYPES OF OPPORTUNITIES
 listed in ~/.config/how-can-i-help/ignored separated by whitespaces or newlines.
 
 Allowed types:
-wnpp, newcomer, no-testing, testing-autorm, rfs
+wnpp, help-tag, newcomer, no-testing, testing-autorm, rfs
 
 Allowed WNPP types:
 O, RFA, RFH, ITA
@@ -130,6 +130,9 @@ The following acronyms are used to describe the supported types:
 *newcomer*
   Bugs tagged with the 'newcomer' tag. Those bugs were formerly tagged with the now deprecated 'gift' tag.
 
+*help-tag*
+  Bugs tagged with the 'help' tag.
+
 *no-testing*
   Packages removed from Debian 'testing'.
 

Reply via email to