Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up matching regex #1

Open
wants to merge 1 commit into
base: feat/config-option
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions api-ref-burndown.py
Expand Up @@ -14,7 +14,7 @@
import requests
from requests.auth import HTTPDigestAuth

TOP = '../nova/nova/conf'
TOP = 'nova/nova/conf'

PROJECT_SITE = "https://review.openstack.org/changes/"
DIFF_QUERY = "%s/revisions/current/patch"
Expand Down Expand Up @@ -111,14 +111,13 @@ def update_review_list(files, updated):
what = "needs:%s" % update['tag']
fdata[what] = update['number']


for fname in sorted(glob.glob("%s/*.py" % TOP)):
with open(fname) as f:
fdata = {'filename': os.path.basename(fname)}
content = f.readlines()
done = True
for key in PHASES:
if ".. %s\n" % key in content:
if "# %s\n" % key in content:
fdata[key] = "TODO"
done = False
counts[key].append(fname)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will also need to change the "index.html": http://paste.openstack.org/show/526602/

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 77 should probably be: m = re.match('-# needs:(.*)', line)

The api-ref source need .. for comments, we need #.

Expand Down