summaryrefslogtreecommitdiffstats
path: root/bin/get-bug-status
blob: b04c420af8af2d207fa0e6d18f829a84adcd6322 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/ruby
require 'soap/rpc/driver'
# Nico Golde <nion@debian.org>
# Latest change: Do Sep 20 20:13:27 CEST 2007
# return fixed version or TODO: fix for given bug

bug = ARGV[0].to_i
host = "bugs.debian.org"
port = 80
server="http://#{host}:#{port}/cgi-bin/soap.cgi"
ns = 'Debbugs/SOAP/'
drv = SOAP::RPC::Driver.new(server, ns) 
drv.add_method('get_status','bugnumber')

response = drv.get_status(bug)

if response[bug] == nil then
    puts "bug not found"
    exit
end

fix = response[bug].fixed_versions[0].to_s
tags =  response[bug].tags.to_s

if fix == nil or fix == "" then
    print "TODO: fix"
    if tags =~ /patch/
        print ", patch available"
    end
    if tags =~ /pending/
        print ", pending"
    end
else
    puts "TODO: mark as fixed in " + fix
end

© 2014-2024 Faster IT GmbH | imprint | privacy policy