Skip to content
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/always-on-metadata-guards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,15 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
STALE_DAYS: "14"
BASE_REF: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
git fetch origin main
BASE_SHA="$BASE_REF"
# base.sha est la POINTE de la base au moment de l'evenement (mesure
# #14333 : == origin/main sur la PR de controle #15426, donc
# BASE_SHA == MAIN_SHA -> "Base is up-to-date" inconditionnel,
# organe muet). Le point de fourche reel de la PR est le merge-base
# de sa tete avec main.
BASE_SHA="$(git merge-base "$PR_HEAD_SHA" origin/main)"
MAIN_SHA="$(git rev-parse origin/main)"
if [ "$BASE_SHA" = "$MAIN_SHA" ]; then
echo "Base is up-to-date."
Expand Down
Loading