diff options
author | Max Maischein <corion@corion.net> | 2019-11-19 18:25:30 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-11-21 08:39:31 -0800 |
commit | e6769f93f413fd6d2ccd494444da8113892c2531 (patch) | |
tree | 7da162ab81b65eb1a3a2b558c18a37c3f8a1381d /.github | |
parent | a581649220d2c34f0a2bd0d176f7278cd09c7f28 (diff) | |
download | perl-e6769f93f413fd6d2ccd494444da8113892c2531.tar.gz |
Try to find the appropriate SHAs
We want all the patches between the branch-off point from
blead and the current branch. The current branch position lives in
$ENV{GITHUB_SHA}, and the (latest) branch-off point from blead is
found by running
git merge-base $ENV{GITHUB_BASE_REF} $ENV{GITHUB_HEAD_REF}
We don't want to use the last commit, as it's a merge commit.
That commit will also have the Github mail address, not the real
git mail address of the author . Instead we use the (second)
parent commit to that merge commit.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/smoke-information.yml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.github/workflows/smoke-information.yml b/.github/workflows/smoke-information.yml index 82ef310ff2..abc30b9551 100644 --- a/.github/workflows/smoke-information.yml +++ b/.github/workflows/smoke-information.yml @@ -23,6 +23,12 @@ jobs: - name: Involved authors run: | if [ -n "${GITHUB_HEAD_REF}" ]; then - echo "Pull request" - git log --pretty=format:"Author: %an <%ae>" ${GITHUB_BASE_REF}..${GITHUB_HEAD_REF} + echo "Pull request authors" + # env + # Create the names of the branches here, as they don't seem + # to exist properly?! + git switch -c $GITHUB_HEAD_REF + echo git merge-base origin/${GITHUB_BASE_REF} ${GITHUB_HEAD_REF} + branch_off=$(git merge-base origin/${GITHUB_BASE_REF} ${GITHUB_HEAD_REF}) + git log --pretty=format:"Author: %an <%ae>" $branch_off..${GITHUB_SHA}^2 fi |