From aa1d1379182a48718e66f5e18148be386fbdb815 Mon Sep 17 00:00:00 2001 From: Scott Wyman Neagle Date: Fri, 28 Jan 2022 15:44:44 -0500 Subject: [PATCH] =?UTF-8?q?check=20that=20a=20commit=20is=20not=20in=20the?= =?UTF-8?q?=20develop=20history=20before=20running=20the=20=E2=80=A6=20(#2?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * check that a commit is not in the develop history before running the version check #25 * version bump --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/version.yml | 10 ++++++++++ CHANGELOG.md | 7 +++++++ VERSION | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b23f38403..b0ab049ed 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,8 +4,8 @@ ⚠️ Add a note to /CHANGELOG.md with your version number and the date, summarizing the changes. ⚠️ If your pull request fixes an open issue, please link to the issue. ⚠️ Rebase the latest changes from the develop branch. Assuming origin points to https://github.com/AgnostiqHQ/covalent, you should run git rebase origin/develop. +--> - [ ] I have added the tests to cover my changes. - [ ] I have updated the documentation, VERSION, and CHANGELOG accordingly. - [ ] I have read the CONTRIBUTING document. ---> diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 09e681bff..d3be40ed2 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -36,11 +36,18 @@ jobs: uses: actions/checkout@v1 with: fetch-depth: 0 + - name: Check git history + run: | + if git merge-base --is-ancestor $GITHUB_SHA origin/develop; then + echo "DEVELOP_COMMIT_HISTORY=$GITHUB_SHA" >> $GITHUB_ENV + fi - name: Read head version + if: ${{ github.sha != env.DEVELOP_COMMIT_HISTORY }} run: | HEAD_VERSION="$(cat ./VERSION)" echo "HEAD_VERSION=$HEAD_VERSION" >> $GITHUB_ENV - name: Validate changelog entry + if: ${{ github.sha != env.DEVELOP_COMMIT_HISTORY }} run: | git diff --name-only origin/develop | grep CHANGELOG if [[ $(grep -c "\b${HEAD_VERSION}\b" CHANGELOG.md) > 1 ]]; then @@ -58,12 +65,15 @@ jobs: exit 3 fi - name: Check out base + if: ${{ github.sha != env.DEVELOP_COMMIT_HISTORY }} run: git checkout develop - name: Read base version + if: ${{ github.sha != env.DEVELOP_COMMIT_HISTORY }} run: | BASE_VERSION="$(cat ./VERSION)" echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_ENV - name: Validate version change + if: ${{ github.sha != env.DEVELOP_COMMIT_HISTORY }} run: | echo "head version is ${HEAD_VERSION}" echo "base version is ${BASE_VERSION}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 167b8ade3..6c3a2f8cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.22.9] - 2022-01-27 + +### Fixed + +- Fixing version check action so that it doesn't run on commits that are in develop +- Edited PR template so that markdown checklist appears properly + ## [0.22.8] - 2022-01-27 ### Fixed diff --git a/VERSION b/VERSION index eca6a4a43..6b9f278d0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.22.8 +0.22.9