/[secure-testing]/bin/get-bug-status
ViewVC logotype

Contents of /bin/get-bug-status

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12517 - (show annotations) (download)
Sat Aug 8 17:26:46 2009 UTC (3 years, 9 months ago) by geissert
File size: 917 byte(s)
Add a 'fixed-only' mode to get-bug-status so that it can be used for
general maintenance pourposes
1 #!/usr/bin/ruby
2 require 'soap/rpc/driver'
3 # Nico Golde <nion@debian.org>
4 # Latest change: Di Nov 13 16:37:13 CET 2007
5 # return fixed version or TODO: fix for given bug
6
7 bug = ARGV[0].to_i
8 fixed_only = (ARGV[1].to_s == 'fixed')
9 host = "bugs.debian.org"
10 port = 80
11 server="http://#{host}:#{port}/cgi-bin/soap.cgi"
12 ns = 'Debbugs/SOAP/'
13 drv = SOAP::RPC::Driver.new(server, ns)
14 drv.add_method('get_status','bugnumber')
15
16 response = drv.get_status(bug)
17
18 if response[bug] == nil then
19 puts "bug not found"
20 exit
21 end
22
23 fix = response[bug].fixed_versions[0].to_s
24 tags = response[bug].tags.to_s
25 severity = response[bug].severity.to_s
26
27 if fix == nil or fix == "" then
28 exit if fixed_only
29 print "TODO: fix (" + severity + ")"
30 if tags =~ /patch/
31 print ", patch available"
32 end
33 if tags =~ /pending/
34 print ", pending"
35 end
36 puts
37 else
38 puts "TODO: mark #{bug} as fixed in " + fix
39 end
40

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5