Skip to content

Commit 6d18221

Browse files
committed
Standardise files with files in sous-chefs/repo-management
Signed-off-by: Xorima Bot <[email protected]>
1 parent 17e624d commit 6d18221

14 files changed

+149
-23
lines changed

Diff for: .circleci/config.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
version: 2.1
3+
orbs:
4+
kitchen: sous-chefs/kitchen@2
5+
workflows:
6+
danger:
7+
jobs:
8+
- kitchen/danger:
9+
name: danger
10+
context: Danger-Minimal

Diff for: .editorconfig

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
# https://EditorConfig.org
2-
1+
#https://EditorConfig.org
32
# top-most EditorConfig file
43
root=true
54

6-
# Unix-style newlines with a newline ending every file
75
[*]
86
end_of_line = lf
97
insert_final_newline = true
10-
11-
# 2 space indentation
128
indent_style = space
139
indent_size = 2
14-
15-
# Avoid issues parsing cookbook files later
1610
charset = utf-8
17-
18-
# Avoid cookstyle warnings
1911
trim_trailing_whitespace = true

Diff for: .envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use chefworkstation

Diff for: .github/workflows/md-links.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: md-links
3+
4+
"on":
5+
pull_request:
6+
push:
7+
branches: [master]
8+
9+
jobs:
10+
md-links:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@master
15+
- name: markdown-link-check
16+
uses: gaurav-nelson/github-action-markdown-link-check@v1
17+
with:
18+
use-verbose-mode: "yes"
19+
folder-path: "documentation"

Diff for: .github/workflows/stale.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Mark stale issues and pull requests
3+
4+
"on":
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
jobs:
9+
stale:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/stale@v3
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
close-issue-message: >
18+
Closing due to inactivity.
19+
If this is still an issue please reopen or open another issue.
20+
Alternatively drop by the #sous-chefs channel on the [Chef Community Slack](http://community-slack.chef.io/) and we'll be happy to help!
21+
Thanks, Sous-Chefs.
22+
days-before-close: 7
23+
days-before-stale: 365
24+
stale-issue-message: >
25+
Marking stale due to inactivity.
26+
Remove stale label or comment or this will be closed in 7 days.
27+
Alternatively drop by the #sous-chefs channel on the [Chef Community Slack](http://community-slack.chef.io/) and we'll be happy to help!
28+
Thanks, Sous-Chefs.

Diff for: .gitignore

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
*.rbc
22
.config
3+
coverage
34
InstalledFiles
45
lib/bundler/man
56
pkg
7+
rdoc
8+
spec/reports
69
test/tmp
710
test/version_tmp
811
tmp
@@ -11,32 +14,27 @@ _Store
1114
*#
1215
.#*
1316
\#*#
17+
.*.sw[a-z]
1418
*.un~
1519
*.tmp
1620
*.bk
1721
*.bkup
1822

19-
# editor temp files
20-
.idea
21-
.*.sw[a-z]
22-
2323
# ruby/bundler files
2424
.ruby-version
2525
.ruby-gemset
2626
.rvmrc
2727
Gemfile.lock
2828
.bundle
2929
*.gem
30-
coverage
31-
spec/reports
3230

33-
# YARD / rdoc artifacts
31+
# YARD artifacts
3432
.yardoc
3533
_yardoc
3634
doc/
37-
rdoc
35+
.idea
3836

39-
# chef infra stuff
37+
# chef stuff
4038
Berksfile.lock
4139
.kitchen
4240
kitchen.local.yml

Diff for: .overcommit.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
PreCommit:
3+
TrailingWhitespace:
4+
enabled: true
5+
YamlLint:
6+
enabled: true
7+
Rspec:
8+
enabled: true
9+
required_executable: 'rspec'
10+
Cookstyle:
11+
enabled: true
12+
required_executable: 'cookstyle'
13+
command: ["cookstyle"]
14+
Delivery:
15+
enabled: true
16+
required_executable: 'delivery'
17+
flags: ['local', 'all']
18+
CommitMsg:
19+
HardTabs:
20+
enabled: true

Diff for: .vscode/extensions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"rebornix.ruby",
55
"editorconfig.editorconfig"
66
]
7-
}
7+
}

Diff for: .yamllint

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
extends: default
3+
rules:
4+
line-length:
5+
max: 256
6+
level: warning

Diff for: CODE_OF_CONDUCT.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
Please refer to the Chef Community Code of Conduct at <https://www.chef.io/code-of-conduct/>
1+
# Community Guidelines
2+
3+
This project follows the Chef Community Guidelines <https://docs.chef.io/community_guidelines.html>

Diff for: CONTRIBUTING.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# Contributing
2+
13
Please refer to
2-
https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD
4+
[https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD)

Diff for: Dangerfile

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Reference: http://danger.systems/reference.html
2+
3+
# A pull request summary is required. Add a description of the pull request purpose.
4+
# Changelog must be updated for each pull request that changes code.
5+
# Warnings will be issued for:
6+
# Pull request with more than 400 lines of code changed
7+
# Pull reqest that change more than 5 lines without test changes
8+
# Failures will be issued for:
9+
# Pull request without summary
10+
# Pull requests with code changes without changelog entry
11+
12+
def code_changes?
13+
code = %w(libraries attributes recipes resources files templates)
14+
code.each do |location|
15+
return true unless git.modified_files.grep(/#{location}/).empty?
16+
end
17+
false
18+
end
19+
20+
def test_changes?
21+
tests = %w(spec test kitchen.yml kitchen.dokken.yml)
22+
tests.each do |location|
23+
return true unless git.modified_files.grep(/#{location}/).empty?
24+
end
25+
false
26+
end
27+
28+
failure 'Please provide a summary of your Pull Request.' if github.pr_body.length < 10
29+
30+
warn 'This is a big Pull Request.' if git.lines_of_code > 400
31+
32+
warn 'This is a Table Flip.' if git.lines_of_code > 2000
33+
34+
# Require a CHANGELOG entry for non-test changes.
35+
if !git.modified_files.include?('CHANGELOG.md') && code_changes?
36+
failure 'Please include a CHANGELOG entry.'
37+
end
38+
39+
# Require Major Minor Patch version labels
40+
unless github.pr_labels.grep /minor|major|patch/i
41+
warn 'Please add a release label to this pull request'
42+
end
43+
44+
# A sanity check for tests.
45+
if git.lines_of_code > 5 && code_changes? && !test_changes?
46+
warn 'This Pull Request is probably missing tests.'
47+
end

Diff for: TESTING.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
Please refer to
2-
<https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD>
1+
# Testing
2+
3+
Please refer to [the community cookbook documentation on testing](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD).

Diff for: documentation/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)