Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
34 changes: 34 additions & 0 deletions latest-prs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash -eu
function stable_branch()
{
git branch --format='%(refname:lstrip=2)'|grep '^[0-9].x$'|sort|tail --lines=1
}

function latest_tag_date()
{
git --no-pager show --format=%aI --no-patch "$(git describe --abbrev=0 --tags)"|tail --lines 1
}

function urlencode()
{
read -r toEncode
php --run "echo urlencode('$toEncode');"
}

function current_branch()
{
git rev-parse --abbrev-ref HEAD
}

function repo_path()
{
git remote --verbose \
| grep ':sonata' \
| grep 'git@' \
| head --lines=1 \
| cut --delimiter=':' --fields=2 \
| cut --delimiter='.' --fields=1
}
git checkout "$(stable_branch)"
git pull --all --prune
xdg-open "https://github.com/$(repo_path)/pulls?q=base:$(current_branch)+merged:>$(latest_tag_date|urlencode)"
2 changes: 2 additions & 0 deletions project/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,8 @@ After that, go on the pull requests page of the repo and replace the default fil
base:3.x merged:>2018-04-20T09:47:48Z
```

All the previous steps are automated up in [this shell script](https://github.com/sonata-project/dev-kit/latest-prs).

- `base`: The base branch where the PR are merged.
It MUST be the current stable branch, or the legacy branch where you want to make a release.
- `merged`: All the pull request merged **after** the given datetime.
Expand Down