Skip to content

Commit

Permalink
Merge pull request #73 from jmlopez-rod/hotfix/0.19.3
Browse files Browse the repository at this point in the history
(hotfix) 0.19.3
  • Loading branch information
jmlopez-rod authored Apr 14, 2023
2 parents bdcc3a4 + 83292a9 commit 4dcbf7d
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
## [Unreleased]

## [0.19.3] <a name="0.19.3" href="#0.19.3">-</a> April 14, 2023

- `review_release` ignores previously closed prs.

## [0.19.2] <a name="0.19.2" href="#0.19.2">-</a> April 10, 2023

- Support python 3.11. `Foo.BAR` in Python 3.11 no longer returns the member
Expand Down Expand Up @@ -255,7 +259,8 @@ prs and the latest on the `master` branch.
- Provides basic utilities to create a CI/CD flow via the m cli.
- As a library, it facilities the creation of clis similar to m.

[unreleased]: https://github.com/jmlopez-rod/m/compare/0.19.2...HEAD
[unreleased]: https://github.com/jmlopez-rod/m/compare/0.19.3...HEAD
[0.19.3]: https://github.com/jmlopez-rod/m/compare/0.19.2...0.19.3
[0.19.2]: https://github.com/jmlopez-rod/m/compare/0.19.1...0.19.2
[0.19.1]: https://github.com/jmlopez-rod/m/compare/0.19.0...0.19.1
[0.19.0]: https://github.com/jmlopez-rod/m/compare/0.18.1...0.19.0
Expand Down
2 changes: 1 addition & 1 deletion m/m.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
owner: jmlopez-rod
repo: m
version: 0.19.2
version: 0.19.3
workflow: m_flow
5 changes: 3 additions & 2 deletions packages/python/m/ci/review_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,19 @@ def acknowledge_git_status(status: str) -> OneOf[Issue, None]:
return issue('operation cancelled by user')


def inspect_prs(prs: list[PullRequest]) -> OneOf[Issue, None]:
def inspect_prs(all_prs: list[PullRequest]) -> OneOf[Issue, None]:
"""Inspect the release pull requests.
There should not be any pull requests when calling `review_release`.
This is a one time operation.
Args:
prs: The list of pull requests.
all_prs: The list of pull requests.
Returns:
An issue if prs already exist, None otherwise.
"""
prs = [pr for pr in all_prs if pr.closed is False]
if prs:
return issue('release is already in review', context={
'prs': {pr.number: pr.url for pr in prs},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"data": {
"repository": {
"pullRequests": {
"nodes": [
{
"closed": true,
"title": "(hotfix) 0.5.1",
"number": 31,
"baseRefName": "master",
"mergeable": "MERGEABLE",
"merged": false,
"author": { "login": "jmlopez-rod" },
"latestReviews": { "nodes": [] },
"url": "https://github.com/jmlopez-rod/git-flow/pull/31"
},
{
"closed": true,
"title": "(hotfix to develop) 0.5.1",
"number": 32,
"baseRefName": "develop",
"mergeable": "MERGEABLE",
"merged": false,
"author": { "login": "jmlopez-rod" },
"latestReviews": { "nodes": [] },
"url": "https://github.com/jmlopez-rod/git-flow/pull/32"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
'"32": "https://github.com/jmlopez-rod/git-flow/pull/32"',
],
),
TCase(
branch='release/0.1.0',
exit_code=1,
graphql_response='cancelled.json',
user_input=['no'],
errors=[
'operation cancelled by user',
],
),
TCase(
branch='release/0.1.0',
exit_code=1,
Expand Down
2 changes: 1 addition & 1 deletion packages/python/tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ else
# To run specific tests:
# python -m unittest discover -s packages/python -v -k tests.cli.commands.test_json.CliJsonTest
# python -m pytest -vv -k test_m_npm
pytest -p no:logging packages/python -vv -k test_free_flow
pytest -p no:logging packages/python -vv -k test_m_review_release
fi

0 comments on commit 4dcbf7d

Please sign in to comment.