8000 Use GitHub Issues by Mariatta · Pull Request #265 · python/blurb_it · GitHub
[go: up one dir, main page]

Skip to content

Use GitHub Issues #265

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

Merged
merged 6 commits into from
Apr 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change the form labels to GH Issue # and GH PR #
Produce filename with `gh-issue-<n>`
Update tests.
  • Loading branch information
Mariatta committed Mar 24, 2022
commit 32eaed7fe26d42db16349a8666658f95e4a61287
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
dynamic_context = test_function
2 changes: 1 addition & 1 deletion blurb_it/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
async def get_misc_news_filename(issue_number, section, body):
date = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())
nonce = await nonceify(body)
path = f"Misc/NEWS.d/next/{section}/{date}.gh-{issue_number}.{nonce}.rst"
path = f"Misc/NEWS.d/next/{section}/{date}.gh-issue-{issue_number}.{nonce}.rst"
return path


Expand Down
6 changes: 3 additions & 3 deletions templates/add_blurb.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ <h3>📜🤖 Blurb it again?</h3>
<input type="hidden" name="csrf" value="{{ csrf }}">
<div class="mb-3">
<div class="col form-inline">
<label for="issue_number" class="form-inline">gh-</label><input type="text" class="form-control form-inline" placeholder="12345" id="issue_number" name="issue_number" required>
<label for="issue_number" class="form-inline">GH Issue #</label><input type="text" class="form-control form-inline" placeholder="12345" id="issue_number" name="issue_number" required>
</div>
<div class="col form-inline">
<small id="issue_number-help" class="form-text text-muted">The CPython GitHub issue number.</small>
</div>
</div>
<div class="mb-3">
<div class="col form-inline">
<label for="pr_number" class="form-inline">GH-</label><input type="text" class="form-control form-inline" placeholder="12345" id="pr_number" name="pr_number" required>
<label for="pr_number" class="form-inline">GH Pull Request #</label><input type="text" class="form-control form-inline" placeholder="12345" id="pr_number" name="pr_number" required>
</div>
<div class="col form-inline">
<small id="gh-help" class="form-text text-muted">The CPython GitHub pull request number.</small>
Expand Down Expand Up @@ -54,7 +54,7 @@ <h3>📜🤖 Blurb it again?</h3>
<div class="mb-3">
<textarea class="form-control" id="news_entry" name="news_entry" rows="10" placeholder="Write your Misc/NEWS entry below.
It should be a simple ReST paragraph.
Don't start with '- Issue #<n>: ' or '- gh-<n>: ' or that sort of stuff." required></textarea>
Don't start with '- Issue #<n>: ' or '- gh-issue-<n>: ' or that sort of stuff." required></textarea>
</div>
<button type="submit" class="btn btn-primary mb-2">📜🤖 blurb it!</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def test_get_misc_news_filename():
)

assert path.startswith("Misc/NEWS.d/next/Library/")
assert path.endswith(".gh-123.Ps4kgC.rst")
assert path.endswith(".gh-issue-123.Ps4kgC.rst")


async def test_has_session():
Expand Down
0