From ca61026c6e2ad98881214b4d21410f6232d1ab6c Mon Sep 17 00:00:00 2001 From: Thiyagu55 Date: Wed, 13 Jul 2022 16:15:30 +0530 Subject: [PATCH 1/5] CHANGELOG.md Implementation --- .github/workflows/python-changelog.yml | 37 +++++++++++++++++++++++++ python/sqlcommenter-python/CHANGELOG.md | 12 ++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/python-changelog.yml create mode 100644 python/sqlcommenter-python/CHANGELOG.md diff --git a/.github/workflows/python-changelog.yml b/.github/workflows/python-changelog.yml new file mode 100644 index 00000000..c25d97c8 --- /dev/null +++ b/.github/workflows/python-changelog.yml @@ -0,0 +1,37 @@ +# This action requires that any PR targeting the main branch should touch at +# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "Skip +# Changelog" label to disable this action. + +name: changelog + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] +# branches: +# - master + paths: + - python/sqlcommenter-python/** + +jobs: + changelog: + runs-on: ubuntu-latest + if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')" + + steps: + - uses: actions/checkout@v2 + + - name: Check for CHANGELOG changes + working-directory: ./python/sqlcommenter-python/sqlcommenter-python + run: | + # Only the latest commit of the feature branch is available + # automatically. To diff with the base branch, we need to + # fetch that too (and we only need its latest commit). + git fetch origin ${{ github.base_ref }} --depth=1 + if [[ $(git diff --name-only FETCH_HEAD | grep CHANGELOG) ]] + then + echo "A CHANGELOG was modified. Looks good!" + else + echo "No CHANGELOG was modified." + echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required." + false + fi \ No newline at end of file diff --git a/python/sqlcommenter-python/CHANGELOG.md b/python/sqlcommenter-python/CHANGELOG.md new file mode 100644 index 00000000..3c11c81c --- /dev/null +++ b/python/sqlcommenter-python/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +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). + +## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.12.0rc2-0.32b0...HEAD) + +### Added + +### Fixed From 1f6ebb7cd7340ab340834f768b35e89d6b34299e Mon Sep 17 00:00:00 2001 From: Thiyagu55 Date: Wed, 13 Jul 2022 16:18:26 +0530 Subject: [PATCH 2/5] CHANGELOG.md Implementation --- .github/workflows/python-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-changelog.yml b/.github/workflows/python-changelog.yml index c25d97c8..58b9ffe6 100644 --- a/.github/workflows/python-changelog.yml +++ b/.github/workflows/python-changelog.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 - name: Check for CHANGELOG changes - working-directory: ./python/sqlcommenter-python/sqlcommenter-python + working-directory: ./python/sqlcommenter-python run: | # Only the latest commit of the feature branch is available # automatically. To diff with the base branch, we need to From 054cf94e9c18eec29897a435d1a9e5aebb307edf Mon Sep 17 00:00:00 2001 From: Thiyagu55 Date: Wed, 13 Jul 2022 16:26:47 +0530 Subject: [PATCH 3/5] Adding dummy changelog.yml --- .github/workflows/changelog.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 00000000..8f039b58 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,19 @@ +# This action requires that any PR targeting the main branch should touch at +# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "Skip +# Changelog" label to disable this action. + +name: changelog + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] +# branches: +# - master + paths-ignore: + - python/sqlcommenter-python/** + +jobs: + changelog: + runs-on: ubuntu-latest + steps: + - run: 'echo "No build required" ' \ No newline at end of file From ce79485fd840073abe57ef50060210b82ef8f80b Mon Sep 17 00:00:00 2001 From: Thiyagu55 Date: Wed, 13 Jul 2022 16:58:47 +0530 Subject: [PATCH 4/5] Updated changelog.yml to run only on master branch --- .github/workflows/changelog.yml | 4 ++-- .github/workflows/python-changelog.yml | 4 ++-- python/sqlcommenter-python/CHANGELOG.md | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 8f039b58..e7849bcd 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -7,8 +7,8 @@ name: changelog on: pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] -# branches: -# - master + branches: + - master paths-ignore: - python/sqlcommenter-python/** diff --git a/.github/workflows/python-changelog.yml b/.github/workflows/python-changelog.yml index 58b9ffe6..1d476993 100644 --- a/.github/workflows/python-changelog.yml +++ b/.github/workflows/python-changelog.yml @@ -7,8 +7,8 @@ name: changelog on: pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] -# branches: -# - master + branches: + - master paths: - python/sqlcommenter-python/** diff --git a/python/sqlcommenter-python/CHANGELOG.md b/python/sqlcommenter-python/CHANGELOG.md index 3c11c81c..2f69b320 100644 --- a/python/sqlcommenter-python/CHANGELOG.md +++ b/python/sqlcommenter-python/CHANGELOG.md @@ -5,8 +5,10 @@ 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). -## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.12.0rc2-0.32b0...HEAD) +## Unreleased ### Added +- CHANGELOG.md Implementation for python + ([#142](https://github.com/google/sqlcommenter/pull/142)) ### Fixed From 5d02878d176cbd4b7355b31416189b2c32976354 Mon Sep 17 00:00:00 2001 From: Thiyagu55 Date: Wed, 13 Jul 2022 17:00:26 +0530 Subject: [PATCH 5/5] Added new line at the end of changelog.yml --- .github/workflows/changelog.yml | 2 +- .github/workflows/python-changelog.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index e7849bcd..8ab7bdde 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -16,4 +16,4 @@ jobs: changelog: runs-on: ubuntu-latest steps: - - run: 'echo "No build required" ' \ No newline at end of file + - run: 'echo "No build required" ' diff --git a/.github/workflows/python-changelog.yml b/.github/workflows/python-changelog.yml index 1d476993..7e2953bb 100644 --- a/.github/workflows/python-changelog.yml +++ b/.github/workflows/python-changelog.yml @@ -34,4 +34,4 @@ jobs: echo "No CHANGELOG was modified." echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required." false - fi \ No newline at end of file + fi