mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
ci: Fetch the right target branch
And remove a superfluous fallback to the default branch - we already check that the target branch is defined. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1973>
This commit is contained in:
parent
cd355b5d74
commit
264c625b79
@ -151,8 +151,8 @@ check-code-style:
|
|||||||
script:
|
script:
|
||||||
- if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
|
- if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
|
||||||
then
|
then
|
||||||
git fetch origin master;
|
git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME ;
|
||||||
export common_parent_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git rev-list --first-parent HEAD) | head -1) ;
|
export common_parent_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME") <(git rev-list --first-parent HEAD) | head -1) ;
|
||||||
python3 -u ./check-style.py --dry-run --sha $common_parent_sha ;
|
python3 -u ./check-style.py --dry-run --sha $common_parent_sha ;
|
||||||
else
|
else
|
||||||
echo "Not a merge request" ;
|
echo "Not a merge request" ;
|
||||||
|
Loading…
Reference in New Issue
Block a user