Skip to content

Commit eb21964

Browse files
authored
Merge pull request #1011 from puppetlabs/pdksync-changelog-max-issues-500
pdksync: changelog_max_issues set to 500
2 parents 6d5e71b + 1061553 commit eb21964

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

.github/workflows/auto_release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,14 @@ jobs:
4646
run: |
4747
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
4848
49-
- name: "Commit changes"
49+
- name: "Check if a release is necessary"
5050
if: ${{ github.repository_owner == 'puppetlabs' }}
51+
id: check
52+
run: |
53+
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
54+
55+
- name: "Commit changes"
56+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
5157
run: |
5258
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
5359
git config --local user.name "GitHub Action"
@@ -57,7 +63,7 @@ jobs:
5763
- name: Create Pull Request
5864
id: cpr
5965
uses: puppetlabs/peter-evans-create-pull-request@v3
60-
if: ${{ github.repository_owner == 'puppetlabs' }}
66+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
6167
with:
6268
token: ${{ secrets.GITHUB_TOKEN }}
6369
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
@@ -73,7 +79,7 @@ jobs:
7379
labels: "maintenance"
7480

7581
- name: PR outputs
76-
if: ${{ github.repository_owner == 'puppetlabs' }}
82+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
7783
run: |
7884
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
7985
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

.sync.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Gemfile:
77
optional:
88
":development":
99
- gem: github_changelog_generator
10+
Rakefile:
11+
changelog_user: puppetlabs
12+
changelog_max_issues: 500
1013
spec/spec_helper.rb:
1114
mock_with: ":rspec"
1215
coverage_report: true

Rakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').a
1010

1111
def changelog_user
1212
return unless Rake.application.top_level_tasks.include? "changelog"
13-
returnVal = nil || JSON.load(File.read('metadata.json'))['author']
13+
returnVal = "puppetlabs" || JSON.load(File.read('metadata.json'))['author']
1414
raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
1515
puts "GitHubChangelogGenerator user:#{returnVal}"
1616
returnVal
@@ -43,12 +43,14 @@ end
4343

4444
PuppetLint.configuration.send('disable_relative')
4545

46+
4647
if Bundler.rubygems.find_name('github_changelog_generator').any?
4748
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
4849
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?
4950
config.user = "#{changelog_user}"
5051
config.project = "#{changelog_project}"
5152
config.since_tag = "v3.0.0"
53+
config.max_issues = 500
5254
config.future_release = "#{changelog_future_release}"
5355
config.exclude_labels = ['maintenance']
5456
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)."

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@
7777
}
7878
],
7979
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
80-
"template-ref": "heads/main-0-g2381db6",
80+
"template-ref": "heads/main-0-gfe51af3",
8181
"pdk-version": "2.1.1"
8282
}

0 commit comments

Comments
 (0)