Control: found -1 14
Control: tags -1 patch

Tomasz Nitecki wrote on Sun, Jun 19, 2016 at 19:10:45 +0200:
> Apart from a minor code modification, it will also require a minor
> change in the hcih script on the UDD side. I'll try to add it, when I'm
> done with how-can-i-help update.

I've gone ahead and drafted patches for both hcih and udd.  The patches
are untested, since I don't have a udd dev instance and setting one up
appears to require access to ullmann port 5242 (the port appears to be
blocked even from alioth).  That said, the new codepaths are basically
a copy-paste of the existing 'gift' codepaths, so I assume they are
correct.

Patches attached.

Cheers,

Daniel

P.S. bugs.d.o has ignored all my subscription requests to this bug, so
please CC me on replies.
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.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