From b34d4a083f71245794604fd9fa6464e714f958b1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 26 Aug 2024 21:53:56 +0200 Subject: [PATCH] [CI] Fix SemVer check base commit (#5361) After seeing some cases of reported changes that did not happen by the merge request proposer (like https://github.com/paritytech/polkadot-sdk/pull/5339), it became clear that [this](https://github.com/orgs/community/discussions/59677) is probably the issue. The base commit of the SemVer check CI is currently using the *latest* master commit, instead of the master commit at the time when the MR was created. Trying to get the correct base commit now. For this to be debugged, i have to wait until another MR is merged into master. --------- Signed-off-by: Oliver Tale-Yazdi --- .github/scripts/generate-prdoc.py | 1 + .github/workflows/check-semver.yml | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/scripts/generate-prdoc.py b/.github/scripts/generate-prdoc.py index b7b2e6f970fa..ba7def20fcb9 100644 --- a/.github/scripts/generate-prdoc.py +++ b/.github/scripts/generate-prdoc.py @@ -96,6 +96,7 @@ def create_prdoc(pr, audience, title, description, patch, bump, force): # write the parsed PR documentation back to the file with open(path, "w") as f: yaml.dump(prdoc, f) + print(f"PrDoc for PR {pr} written to {path}") def parse_args(): parser = argparse.ArgumentParser() diff --git a/.github/workflows/check-semver.yml b/.github/workflows/check-semver.yml index d9d918b44a23..4d521db90a4a 100644 --- a/.github/workflows/check-semver.yml +++ b/.github/workflows/check-semver.yml @@ -12,7 +12,6 @@ concurrency: env: TOOLCHAIN: nightly-2024-06-01 - jobs: check-semver: runs-on: ubuntu-latest @@ -20,14 +19,14 @@ jobs: image: docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408 steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + fetch-depth: 2 - name: extra git setup - env: - BASE: ${{ github.event.pull_request.base.sha }} run: | git config --global --add safe.directory '*' - git fetch --no-tags --no-recurse-submodules --depth=1 origin $BASE - git branch old $BASE + + git branch old HEAD^1 - name: Comment If Backport if: ${{ startsWith(github.event.pull_request.base.ref, 'stable') }}