-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.sync.yml
175 lines (171 loc) · 5.66 KB
/
.sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
---
appveyor.yml:
delete: true
.gitignore:
paths:
- /[Bb]ackup*/
- /.devcontainer/
- /.gitlab-ci.yml
- /.travis.yml
- /.vscode/
- /appveyor.yml
.gitlab-ci.yml:
delete: true
.travis.yml:
delete: true
.devcontainer:
delete: true
.vscode:
delete: true
.pdkignore:
paths:
- /[Bb]ackup*/
- /provision.yaml
- /.github
- /pdk.yaml
Rakefile:
requires:
- require: puppet_blacksmith/rake_tasks
conditional: "Gem.loaded_specs.key? 'puppet-blacksmith'"
- require: github_changelog_generator/task
conditional: "Gem.loaded_specs.key? 'github_changelog_generator'"
extras:
- >
def changelog_user
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || 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
end
- >
def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil
returnVal ||= begin
metadata_source = JSON.load(File.read('metadata.json'))['source']
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
metadata_source_match && metadata_source_match[1]
end
raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
end
- >
def changelog_future_release
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator future_release:#{returnVal}"
returnVal
end
- >
if Gem.loaded_specs.key? 'github_changelog_generator'
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.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)."
config.add_pr_wo_labels = true
config.issues = false
config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB"
config.configure_sections = {
"Changed" => {
"prefix" => "### Changed",
"labels" => ["backwards-incompatible"],
},
"Added" => {
"prefix" => "### Added",
"labels" => ["enhancement", "feature"],
},
"Fixed" => {
"prefix" => "### Fixed",
"labels" => ["bug", "documentation", "bugfix"],
},
}
end
else
desc 'Generate a Changelog from GitHub'
task :changelog do
raise <<EOM
The changelog tasks depends on recent features of the github_changelog_generator gem.
Please manually add it to your .sync.yml for now, and run `pdk update`:
---
Gemfile:
optional:
':development':
- gem: 'github_changelog_generator'
version: '~> 1.15'
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')"
EOM
end
end
Gemfile:
unmanaged: false
optional:
':development':
- gem: 'github_changelog_generator'
version: '~> 1.15'
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')"
- gem: 'puppet-lint-file_ensure-check'
require: false
- gem: 'puppet-lint-manifest_whitespace-check'
require: false
- gem: 'puppet-lint-trailing_comma-check'
require: false
- gem: 'puppet-lint-optional_default-check'
require: false
':test':
- gem: 'puppet_metadata'
version: '~> 4.0'
- gem: 'puppet-blacksmith'
require: false
- gem: 'ed25519'
version:
- '>= 1.2'
- '< 2.0'
require: false
- gem: 'bcrypt_pbkdf'
version:
- '>= 1.0'
- '< 2.0'
require: false
spec/spec_helper.rb:
coverage_report: true
spec_overrides:
- 'RSpec.configure do |c|'
- ' c.facter_implementation = :rspec'
- 'end'
.puppet-lint.rc:
enabled_lint_checks:
- 140chars
- 2sp_soft_tabs
- arrow_alignment
- class_inherits_from_params_class
- double_quoted_strings
- duplicate_params
- file_ensure
- file_mode
- hard_tabs
- leading_zero
- manifest_whitespace_opening_brace_after
- nested_classes_or_defines
- only_variable_string
- optional_default
- parameter_documentation
- parameter_order
- parameter_types
- quoted_booleans
- right_to_left_relationship
- slash_comments
- star_comments
- strict_indent
- trailing_comma
- trailing_whitespace
- unquoted_file_mode
- variable_contains_dash
- variable_is_lowercase
- variable_scope
- variables_not_enclosed