diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2023-06-21 13:57:22 +0200 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2023-06-27 10:33:04 +0200 |
commit | 7771ea42f121b45f6fd2a550497dea416f851dde (patch) | |
tree | b1e145866a219841268fcc02ebccdc8a2debcdb5 /bin | |
parent | 4b4c26c96534c175fc0bd493d2e1a3e21a9afffe (diff) |
check-new-issues: add an explicit command for NOT-FOR-US
This should avoid accidentally typing something and having it
inserted as a NOT-FOR-US entry.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/check-new-issues | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/check-new-issues b/bin/check-new-issues index fef315711f..7f4f3a0eec 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -297,9 +297,9 @@ def print_commands(): * !command to execute a command with system() without any escaping * v or e to launch an editor with the current item * - package-entry to add an entry for "package" and launch an editor (e.g. - poppler <unfixed>) + * n <name> to mark the issue as NOT-FOR-US: <name> * q to save and quit - * CTRL-C to quit without saving - * everything else is inserted as product name for a NOT-FOR-US''') + * CTRL-C to quit without saving''') parser = argparse.ArgumentParser(description="review new CVE entries") parser.add_argument('-l', '--list', action='store_true', @@ -673,15 +673,18 @@ def present_issue(name): subprocess.run(f"{editor} {tmpname}", shell=True) #os.unlink(tmpname) continue - else: - set_cve_nfu(name, line) + elif m := re.match(f'^n\s+(.*)$', line): + nfu = m.group(1).strip() + set_cve_nfu(name, nfu) print("New entry set to:") print_cve(cves[name]) break + else: + print("unknown command") return quit -completion_commands = ".f .c .w .m .r .g ! v e - .help q d".split() +completion_commands = ".f .c .w .m .r .g ! v e - .help n q d".split() def complete_line(text, state): response = None |