]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
pdksync: changelog_max_issues set to 500 pdksync-changelog-max-issues-500
authoradrianiurca <adrian.iurca@gmail.com>
Mon, 6 Sep 2021 12:33:50 +0000 (15:33 +0300)
committeradrianiurca <adrian.iurca@gmail.com>
Mon, 6 Sep 2021 12:33:50 +0000 (15:33 +0300)
.github/workflows/auto_release.yml
.sync.yml
Rakefile
metadata.json

index e0284836004149b1fd5c2bb9ac73bfe1332d5a37..c25a80dcef23585874013970429a351b34d79c95 100644 (file)
@@ -46,8 +46,14 @@ jobs:
       run: |
         echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
 
-    - name: "Commit changes"
+    - name: "Check if a release is necessary"
       if: ${{ github.repository_owner == 'puppetlabs' }}
+      id: check
+      run: |
+        git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
+
+    - name: "Commit changes"
+      if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
       run: |
         git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
         git config --local user.name "GitHub Action"
@@ -57,7 +63,7 @@ jobs:
     - name: Create Pull Request
       id: cpr
       uses: puppetlabs/peter-evans-create-pull-request@v3
-      if: ${{ github.repository_owner == 'puppetlabs' }}
+      if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
       with:
         token: ${{ secrets.GITHUB_TOKEN }}
         commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
@@ -73,7 +79,7 @@ jobs:
         labels: "maintenance"
 
     - name: PR outputs
-      if: ${{ github.repository_owner == 'puppetlabs' }}
+      if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
       run: |
         echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
         echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
index fd21eb66f806d3d744031332ed06b3f6e5466a48..247b988b81ea74ea8120bd3c85ac6b251251df13 100644 (file)
--- a/.sync.yml
+++ b/.sync.yml
@@ -7,6 +7,9 @@ Gemfile:
   optional:
     ":development":
       - gem: github_changelog_generator
+Rakefile:
+  changelog_user: puppetlabs
+  changelog_max_issues: 500
 spec/spec_helper.rb:
   mock_with: ":rspec"
   coverage_report: true
index a365cb9dac151b21132f1962581b28fb82bc95c0..de931720b61abbf9df131e23ed008c4e40dc9347 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -10,7 +10,7 @@ require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').a
 
 def changelog_user
   return unless Rake.application.top_level_tasks.include? "changelog"
-  returnVal = nil || JSON.load(File.read('metadata.json'))['author']
+  returnVal = "puppetlabs" || JSON.load(File.read('metadata.json'))['author']
   raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
   puts "GitHubChangelogGenerator user:#{returnVal}"
   returnVal
@@ -43,12 +43,14 @@ end
 
 PuppetLint.configuration.send('disable_relative')
 
+
 if Bundler.rubygems.find_name('github_changelog_generator').any?
   GitHubChangelogGenerator::RakeTask.new :changelog do |config|
     raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
     config.user = "#{changelog_user}"
     config.project = "#{changelog_project}"
     config.since_tag = "v3.0.0"
+    config.max_issues = 500
     config.future_release = "#{changelog_future_release}"
     config.exclude_labels = ['maintenance']
     config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
index 9749ddd4647c64a5cfd40e9659d99062f71ed2bb..38ffc82a918b6e76a7898179c02af30faab0c662 100644 (file)
@@ -77,6 +77,6 @@
     }
   ],
   "template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
-  "template-ref": "heads/main-0-g2381db6",
+  "template-ref": "heads/main-0-gfe51af3",
   "pdk-version": "2.1.1"
 }