mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ci(news): fetch full history (#21312)
We seem to need the parent commit of the earliest PR commit in order to perform common git functionality to check which files were changed.
This commit is contained in:
parent
9628348a6a
commit
73ddb6daf9
7
.github/workflows/news.yml
vendored
7
.github/workflows/news.yml
vendored
@ -9,16 +9,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
fetch-depth: 0
|
||||||
fetch-depth: ${{ github.event.pull_request.commits }}
|
|
||||||
- name: news.txt needs to be updated
|
- name: news.txt needs to be updated
|
||||||
run: |
|
run: |
|
||||||
for commit in $(git rev-list HEAD); do
|
for commit in $(git rev-list HEAD~${{ github.event.pull_request.commits }}..HEAD); do
|
||||||
message=$(git log -n1 --pretty=format:%s $commit)
|
message=$(git log -n1 --pretty=format:%s $commit)
|
||||||
type="$(echo "$message" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')"
|
type="$(echo "$message" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')"
|
||||||
breaking="$(echo "$message" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')"
|
breaking="$(echo "$message" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')"
|
||||||
if [[ "$type" == "feat" ]] || [[ "$breaking" == "breaking-change" ]]; then
|
if [[ "$type" == "feat" ]] || [[ "$breaking" == "breaking-change" ]]; then
|
||||||
git diff HEAD~$((${{ github.event.pull_request.commits }}-1)) --name-only | grep runtime/doc/news.txt ||
|
! git diff HEAD~${{ github.event.pull_request.commits }}..HEAD --quiet runtime/doc/news.txt ||
|
||||||
{
|
{
|
||||||
echo "
|
echo "
|
||||||
Pull request includes a new feature or a breaking change, but
|
Pull request includes a new feature or a breaking change, but
|
||||||
|
Loading…
Reference in New Issue
Block a user