Skip to content

Commit 3ef7f4e

Browse files
Automated Changelog Entry for 0.23.0 on main (#358)
* Automated Changelog Entry for 0.23.0 on main * add debug * check for dirty after the fetch * always try to stash * force overwrite of changelog Co-authored-by: GitHub Action <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 769d37e commit 3ef7f4e

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

CHANGELOG.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
<!-- <START NEW CHANGELOG ENTRY> -->
44

5+
## 0.23.0
6+
7+
([Full Changelog](https://github.com/jupyter-server/jupyter_releaser/compare/v1...1c4a1e67902b050d3af47510bfb53d697d78d3da))
8+
9+
### Enhancements made
10+
11+
- Highlight next step using GitHub step summary [#357](https://github.com/jupyter-server/jupyter_releaser/pull/357) ([@fcollonval](https://github.com/fcollonval))
12+
- Use bare git for dry run [#356](https://github.com/jupyter-server/jupyter_releaser/pull/356) ([@blink1073](https://github.com/blink1073))
13+
- Use mock github when in dry run mode [#355](https://github.com/jupyter-server/jupyter_releaser/pull/355) ([@blink1073](https://github.com/blink1073))
14+
- Add mock github api [#352](https://github.com/jupyter-server/jupyter_releaser/pull/352) ([@blink1073](https://github.com/blink1073))
15+
16+
### Maintenance and upkeep improvements
17+
18+
- Fix flake8 v5 compat [#354](https://github.com/jupyter-server/jupyter_releaser/pull/354) ([@blink1073](https://github.com/blink1073))
19+
- [pre-commit.ci] pre-commit autoupdate [#353](https://github.com/jupyter-server/jupyter_releaser/pull/353) ([@pre-commit-ci](https://github.com/pre-commit-ci))
20+
- [pre-commit.ci] pre-commit autoupdate [#351](https://github.com/jupyter-server/jupyter_releaser/pull/351) ([@pre-commit-ci](https://github.com/pre-commit-ci))
21+
- Use version template in pyproject [#350](https://github.com/jupyter-server/jupyter_releaser/pull/350) ([@blink1073](https://github.com/blink1073))
22+
- [pre-commit.ci] pre-commit autoupdate [#349](https://github.com/jupyter-server/jupyter_releaser/pull/349) ([@pre-commit-ci](https://github.com/pre-commit-ci))
23+
24+
### Contributors to this release
25+
26+
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter_releaser/graphs/contributors?from=2022-07-11&to=2022-08-08&type=c))
27+
28+
[@blink1073](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_releaser+involves%3Ablink1073+updated%3A2022-07-11..2022-08-08&type=Issues) | [@codecov-commenter](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_releaser+involves%3Acodecov-commenter+updated%3A2022-07-11..2022-08-08&type=Issues) | [@fcollonval](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_releaser+involves%3Afcollonval+updated%3A2022-07-11..2022-08-08&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_releaser+involves%3Apre-commit-ci+updated%3A2022-07-11..2022-08-08&type=Issues)
29+
30+
<!-- <END NEW CHANGELOG ENTRY> -->
31+
532
## 0.22.5
633

734
([Full Changelog](https://github.com/jupyter-server/jupyter_releaser/compare/v1...915239416cf90ef93e136553bc87aa38e5f31a96))
@@ -16,8 +43,6 @@
1643

1744
[@blink1073](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_releaser+involves%3Ablink1073+updated%3A2022-07-08..2022-07-11&type=Issues) | [@codecov-commenter](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_releaser+involves%3Acodecov-commenter+updated%3A2022-07-08..2022-07-11&type=Issues)
1845

19-
<!-- <END NEW CHANGELOG ENTRY> -->
20-
2146
## 0.22.4
2247

2348
([Full Changelog](https://github.com/jupyter-server/jupyter_releaser/compare/v1...a441599cef4e832cfc841d5d75b50a25263a2fec))

jupyter_releaser/lib.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,16 @@ def make_changelog_pr(auth, branch, repo, title, commit_message, body, dry_run=F
163163

164164
# Make a new branch with a uuid suffix
165165
pr_branch = f"changelog-{uuid.uuid1().hex}"
166-
167-
dirty = util.run("git --no-pager diff --stat") != ""
168-
if dirty:
169-
util.run("git stash")
170-
util.run(f"{util.GIT_FETCH_CMD} {branch}")
171-
util.run(f"git checkout -b {pr_branch} origin/{branch}")
166+
util.run(f"{util.GIT_FETCH_CMD} {branch}", echo=True)
167+
dirty = False
168+
try:
169+
util.run("git stash", echo=True)
170+
dirty = True
171+
except Exception:
172+
pass
173+
util.run(f"git checkout -b {pr_branch} origin/{branch}", echo=True)
172174
if dirty:
173-
util.run("git stash apply")
175+
util.run("git merge --squash --strategy-option=theirs stash", echo=True)
174176

175177
# Add a commit with the message
176178
try:
@@ -188,7 +190,7 @@ def make_changelog_pr(auth, branch, repo, title, commit_message, body, dry_run=F
188190
maintainer_can_modify = True
189191

190192
remote_name = util.get_remote_name(dry_run)
191-
util.run(f"git push {remote_name} {pr_branch}")
193+
util.run(f"git push {remote_name} {pr_branch}", echo=True)
192194

193195
# title, head, base, body, maintainer_can_modify, draft, issue
194196
pull = gh.pulls.create(title, head, base, body, maintainer_can_modify, False, None)

0 commit comments

Comments
 (0)