From 0e5616c72a9910d4fe7069693a1e7dc4e0cd84a5 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Fri, 19 Mar 2021 15:19:13 -0600 Subject: [PATCH 01/17] add changelog generator --- .github/workflows/changelog.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/changelog.yaml diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000000..a5f0baa83b --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -0,0 +1,17 @@ +name: changelog + +on: + push: + # branches: + # - main + release: + types: [created, edited] + +jobs: + generate-changelog: + runs-on: ubuntu-20.04 + steps: + - name: genlog + run: docker run -it --rm -v "$(pwd)":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops + + From 1c64878c2d6fef5852d939356a1c0fd8db83ad1c Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Fri, 19 Mar 2021 15:20:59 -0600 Subject: [PATCH 02/17] remove interactive flags from docker invocation --- .github/workflows/changelog.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index a5f0baa83b..8208597c66 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -12,6 +12,6 @@ jobs: runs-on: ubuntu-20.04 steps: - name: genlog - run: docker run -it --rm -v "$(pwd)":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops + run: docker run --rm -v "$(pwd)":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops From 6c8c94ec4a5ac3d10fa9fee9f07c7316894c36e5 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Fri, 19 Mar 2021 15:55:33 -0600 Subject: [PATCH 03/17] try alternative action --- .github/workflows/changelog.yaml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 8208597c66..ca1fd3f260 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -1,17 +1,14 @@ name: changelog -on: - push: - # branches: - # - main - release: - types: [created, edited] - -jobs: - generate-changelog: - runs-on: ubuntu-20.04 - steps: - - name: genlog - run: docker run --rm -v "$(pwd)":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops +name: Run Changelog CI + uses: saadmk11/changelog-ci@v0.7.0 + with: + config_file: .github/workflows/changelog-ci-config.json + on: + push: + branches: + - main + release: + types: [created, edited] From 13c45745ff6d544035ce885994e2d0dbc9bb5feb Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 14:28:10 -0600 Subject: [PATCH 04/17] try alternative changelog generator --- .github/workflows/changelog-ci-config.json | 23 ++++++++++++++++++ .github/workflows/changelog.yaml | 28 +++++++++++++--------- 2 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/changelog-ci-config.json diff --git a/.github/workflows/changelog-ci-config.json b/.github/workflows/changelog-ci-config.json new file mode 100644 index 0000000000..aac8c1ff47 --- /dev/null +++ b/.github/workflows/changelog-ci-config.json @@ -0,0 +1,23 @@ +{ + "header_prefix": "Version:", + "commit_changelog": true, + "pull_request_title_regex": ".*", + "group_config": [ + { + "title": "Bug Fixes", + "labels": ["bug", "bugfix"] + }, + { + "title": "Code Improvements", + "labels": ["improvements", "enhancement"] + }, + { + "title": "New Features", + "labels": ["feature"] + }, + { + "title": "Documentation Updates", + "labels": ["docs", "documentation", "doc"] + } + ] +} diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index ca1fd3f260..7ecd0da89c 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -1,14 +1,20 @@ -name: changelog +name: Changelog CI -name: Run Changelog CI - uses: saadmk11/changelog-ci@v0.7.0 - with: - config_file: .github/workflows/changelog-ci-config.json - on: - push: - branches: - - main - release: - types: [created, edited] +# Controls when the action will run. Triggers the workflow on a pull request +on: + pull_request: + types: [opened, reopened] +jobs: + build: + runs-on: ubuntu-latest + steps: + # Checks-out your repository + - uses: actions/checkout@v2 + + - name: Run Changelog CI + uses: saadmk11/changelog-ci@v0.7.0 + with: + changelog_filename: CHANGELOG.md + config_file: changelog-ci-config.json From 3cf69157a826936ece7b8d2cd5f471bc31398d43 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 14:38:04 -0600 Subject: [PATCH 05/17] remove uncovered line --- main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/main.go b/main.go index cfd93f7c31..e7493681f3 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,6 @@ package main import "fmt" func main() { - fmt.Println("Hello World!") } func test() string { From 65244b074e4edd48c059d1fb488fae4f6fc4884f Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 14:44:59 -0600 Subject: [PATCH 06/17] get rid of unused import --- main.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.go b/main.go index e7493681f3..1dc00a8752 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,5 @@ package main -import "fmt" - func main() { } From 621861cba42d62cd1e8c34625063e48cc18b559f Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 14:56:53 -0600 Subject: [PATCH 07/17] more to cover --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 1dc00a8752..b463976eaf 100644 --- a/main.go +++ b/main.go @@ -4,5 +4,9 @@ func main() { } func test() string { - return "test" + x := 6 + y := 28 + z := 496 + q := 8128 + return "test" + x*y*z*q } From 3ce81176b3fabe88319d1940c8409b9469fb1329 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 15:01:32 -0600 Subject: [PATCH 08/17] fix lint issue --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index b463976eaf..ec510933a3 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,9 @@ package main +import ( + "fmt" +) + func main() { } @@ -8,5 +12,5 @@ func test() string { y := 28 z := 496 q := 8128 - return "test" + x*y*z*q + return fmt.Sprintf("%s:%d", "test", x*y*z*q) } From e2f5e87f9d37d51cbd37de3a613d3e9a0f1bf861 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 15:03:25 -0600 Subject: [PATCH 09/17] fix test with changed input --- main_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main_test.go b/main_test.go index def83402d0..522f317d67 100644 --- a/main_test.go +++ b/main_test.go @@ -8,5 +8,5 @@ import ( func TestMain(t *testing.T) { result := test() - require.Equal(t, "test", result) + require.Equal(t, "test:677289984", result) } From 7d8e253cc1bb1147ab381d37e6a198efddabce92 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 15:28:01 -0600 Subject: [PATCH 10/17] more lines for coverage --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index ec510933a3..c0ea84f071 100644 --- a/main.go +++ b/main.go @@ -8,9 +8,11 @@ func main() { } func test() string { + a := 1 + w := 1 x := 6 y := 28 z := 496 q := 8128 - return fmt.Sprintf("%s:%d", "test", x*y*z*q) + return fmt.Sprintf("%s:%d", "test", a*w*x*y*z*q) } From 2a957db901ddc4e2162d5d7927025e6ad20ee1b0 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 15:36:11 -0600 Subject: [PATCH 11/17] retry original changelog generator --- .github/workflows/changelog.yaml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 7ecd0da89c..5be8ef3ab7 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -1,20 +1,18 @@ -name: Changelog CI +name: changelog -# Controls when the action will run. Triggers the workflow on a pull request on: - pull_request: - types: [opened, reopened] + push: + # branches: + # - main + release: + types: [created, edited] jobs: - build: - runs-on: ubuntu-latest - + generate-changelog: + runs-on: ubuntu-20.04 steps: - # Checks-out your repository - - uses: actions/checkout@v2 + - name: genlog + run: docker run -it --rm -v "$(pwd)":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops + - name: savelog + run: git add CHANGELOG.md && git commit -m'Add changelog' && git push - - name: Run Changelog CI - uses: saadmk11/changelog-ci@v0.7.0 - with: - changelog_filename: CHANGELOG.md - config_file: changelog-ci-config.json From ca816267fde172a478a27c890265ee18597659b0 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 15:48:35 -0600 Subject: [PATCH 12/17] non-interactive invocation --- .github/workflows/changelog.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 5be8ef3ab7..e5463d9357 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: genlog - run: docker run -it --rm -v "$(pwd)":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops + run: docker run --rm -v "$(pwd)":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops - name: savelog run: git add CHANGELOG.md && git commit -m'Add changelog' && git push From 84529533a8c9ae65e8b953981f7b60746d332ec5 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 17:21:32 -0600 Subject: [PATCH 13/17] fix directory for changelog --- .github/workflows/changelog.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index e5463d9357..2b77060370 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -11,8 +11,10 @@ jobs: generate-changelog: runs-on: ubuntu-20.04 steps: + - name: Checkout code + uses: actions/checkout@v2 - name: genlog - run: docker run --rm -v "$(pwd)":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops + run: docker run --rm -v "${GITHUB_WORKSPACE}":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops - name: savelog - run: git add CHANGELOG.md && git commit -m'Add changelog' && git push + run: cd "${GITHUB_WORKSPACE}" && git add CHANGELOG.md && git commit -m'Add changelog' && git push From c30c92e234105779f4097b6ebf2d34461306e4fb Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Mon, 22 Mar 2021 17:26:29 -0600 Subject: [PATCH 14/17] more directory fixes --- .github/workflows/changelog.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 2b77060370..afe46fad4e 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 + - name: Configure git info + run: cd "${GITHUB_WORKSPACE}" && git config --global user.email "support@weave.works" && git config --global user.name "support" - name: genlog run: docker run --rm -v "${GITHUB_WORKSPACE}":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops - name: savelog From a405c49458bb120c42ea6acd0ead263f602ba4b9 Mon Sep 17 00:00:00 2001 From: support Date: Mon, 22 Mar 2021 23:26:53 +0000 Subject: [PATCH 15/17] Add changelog --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..05d747d720 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +## [Unreleased](https://github.com/weaveworks/weave-gitops/tree/HEAD) + +[Full Changelog](https://github.com/weaveworks/weave-gitops/compare/e9118fff43151991e38214385511344b12182310...HEAD) + +**Merged pull requests:** + +- add test so i can see if coverage works [\#2](https://github.com/weaveworks/weave-gitops/pull/2) ([J-Thompson12](https://github.com/J-Thompson12)) +- github workflow [\#1](https://github.com/weaveworks/weave-gitops/pull/1) ([J-Thompson12](https://github.com/J-Thompson12)) + + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From 8eeb9665ac973694840bdf445129b8647f309b89 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Tue, 23 Mar 2021 18:56:53 -0600 Subject: [PATCH 16/17] Working changelog --- .github/workflows/changelog.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index afe46fad4e..2493cba738 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -1,11 +1,8 @@ name: changelog on: - push: - # branches: - # - main release: - types: [created, edited] + types: [published] jobs: generate-changelog: @@ -13,10 +10,14 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Configure git info - run: cd "${GITHUB_WORKSPACE}" && git config --global user.email "support@weave.works" && git config --global user.name "support" - - name: genlog - run: docker run --rm -v "${GITHUB_WORKSPACE}":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops - - name: savelog - run: cd "${GITHUB_WORKSPACE}" && git add CHANGELOG.md && git commit -m'Add changelog' && git push + - name: Create changelog + env: + CHANGELOG_GITHUB_TOKEN: "${{ secrets.CHANGELOG_CREATION_TOKEN }}" + run: | + git config user.name github-actions + git config user.email github-actions@github.com + docker run --rm -v "${GITHUB_WORKSPACE}":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops + git add . + git commit -m "Created changelog" + git push origin HEAD:master From 26e0781b656395763c27bf9088b1161b28c2b874 Mon Sep 17 00:00:00 2001 From: Jerry Jackson Date: Tue, 23 Mar 2021 19:09:40 -0600 Subject: [PATCH 17/17] remove test changelog --- CHANGELOG.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 05d747d720..0000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,14 +0,0 @@ -# Changelog - -## [Unreleased](https://github.com/weaveworks/weave-gitops/tree/HEAD) - -[Full Changelog](https://github.com/weaveworks/weave-gitops/compare/e9118fff43151991e38214385511344b12182310...HEAD) - -**Merged pull requests:** - -- add test so i can see if coverage works [\#2](https://github.com/weaveworks/weave-gitops/pull/2) ([J-Thompson12](https://github.com/J-Thompson12)) -- github workflow [\#1](https://github.com/weaveworks/weave-gitops/pull/1) ([J-Thompson12](https://github.com/J-Thompson12)) - - - -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*