Skip to content

Commit da2f70d

Browse files
committed
entitlements-gitrepo-auditor-plugin
0 parents  commit da2f70d

File tree

262 files changed

+9388
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+9388
-0
lines changed

.github/workflows/acceptance.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: acceptance
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
# Detects changes to any of the source files for entitlements-gitrepo-auditor-plugin
11+
changes:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
16+
outputs:
17+
has_change: ${{ steps.diff.outputs.has_change}}
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- id: fetch-base
23+
if: github.event_name == 'pull_request'
24+
name: fetch the latest commit in the base branch to diff against
25+
run: git fetch --no-tags --prune --depth=1 origin '+refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}'
26+
27+
- id: diff
28+
if: github.event_name == 'pull_request'
29+
name: diff against the base branch latest commit for specific paths
30+
run: |
31+
git diff \
32+
origin/${{ github.base_ref }} \
33+
HEAD \
34+
-- \
35+
'bin/**' \
36+
'lib/**' \
37+
'script/**' \
38+
'spec/**' \
39+
'vendor/**' \
40+
'.ruby-version' \
41+
'entitlements-gitrepo-auditor-plugin.gemspec' \
42+
'Gemfile' \
43+
'Gemfile.lock' \
44+
> diff.txt
45+
46+
# If the diff file is not empty, it has changes.
47+
[ -s diff.txt ] && echo "::set-output name=has_change::true" || echo "::set-output name=has_change::false"
48+
49+
- name: set has_change to true for push to main/master
50+
if: github.event_name == 'push'
51+
run: echo "::set-output name=has_change::true"
52+
53+
acceptance-suite:
54+
needs: changes
55+
runs-on: ubuntu-latest
56+
name: runner / acceptance-tests
57+
permissions:
58+
contents: read
59+
60+
steps:
61+
62+
# If source files were not changed, we don't need the acceptance test suite
63+
- name: bypass
64+
if: ${{ needs.changes.outputs.has_change != 'true' }}
65+
run: |
66+
echo "✅ Bypassing acceptance tests - they are not required for this change"
67+
68+
- name: Check out code
69+
if: ${{ needs.changes.outputs.has_change == 'true' }}
70+
uses: actions/checkout@v2
71+
72+
# Use Docker layer caching for 'docker build' and 'docker-compose build' commands.
73+
# https://github.com/satackey/action-docker-layer-caching/releases/tag/v0.0.11
74+
- uses: satackey/action-docker-layer-caching@46d2c640b1d8ef50d185452ad6fb324e6bd1d052
75+
if: ${{ needs.changes.outputs.has_change == 'true' }}
76+
continue-on-error: true
77+
78+
- name: acceptance tests
79+
if: ${{ needs.changes.outputs.has_change == 'true' }}
80+
run: script/cibuild-entitlements-gitrepo-auditor-plugin-acceptance
81+
82+
- name: acceptance tests passed
83+
run: echo "✅ The acceptance test suite has passed"

.github/workflows/codeql-analysis.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ main ]
9+
schedule:
10+
- cron: '25 4 * * 5'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'ruby' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v1
33+
with:
34+
languages: ${{ matrix.language }}
35+
36+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
37+
# If this step fails, then you should remove it and run the build manually (see below)
38+
- name: Autobuild
39+
uses: github/codeql-action/autobuild@v1
40+
#- run: |
41+
# make bootstrap
42+
# make release
43+
44+
- name: Perform CodeQL Analysis
45+
uses: github/codeql-action/analyze@v1

.github/workflows/lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
rubocop:
11+
name: runner / rubocop
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
- name: Check out code
18+
uses: actions/checkout@v2
19+
20+
# https://github.com/ruby/setup-ruby/releases/tag/v1.87.0
21+
- uses: ruby/setup-ruby@cf1a6dd2d8563b59c7007e381836fd252ab2ac5b
22+
with:
23+
ruby-version: 2.7.5
24+
bundler-cache: true
25+
26+
- name: rubocop
27+
run: bundle exec rubocop -c .rubocop.yml lib/ spec/

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
rubocop:
11+
name: runner / rspec
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
- name: Check out code
18+
uses: actions/checkout@v2
19+
20+
# https://github.com/ruby/setup-ruby/releases/tag/v1.87.0
21+
- uses: ruby/setup-ruby@cf1a6dd2d8563b59c7007e381836fd252ab2ac5b
22+
with:
23+
ruby-version: 2.7.5
24+
bundler-cache: true
25+
26+
- name: rspec tests
27+
run: script/test -d

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/.bundle
2+
/vendor/gems
3+
4+
# Ignore binstubs
5+
bin/*
6+
!bin/.keep
7+
8+
# There's a place for local caching of container gems to make local builds faster.
9+
# Keep the .keep file but not the gems themselves
10+
vendor/container-gems/*
11+
!vendor/container-gems/.keep
12+
13+
# Coverage reports
14+
coverage/*
15+
16+
.*.swp
17+
18+
# Ignore JetBrains IDEs
19+
.idea

.rubocop.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
inherit_gem:
2+
rubocop-github:
3+
- config/default.yml
4+
5+
AllCops:
6+
DisplayCopNames: true
7+
TargetRubyVersion: 2.7.5
8+
Exclude:
9+
- 'bin/*'
10+
- 'spec/acceptance/fixtures/**/*'
11+
- 'spec/unit/fixtures/**/*'
12+
- 'vendor/gems/**/*'

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.5

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec

Gemfile.lock

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
PATH
2+
remote: .
3+
specs:
4+
entitlements-gitrepo-auditor-plugin (0.1.0)
5+
concurrent-ruby (= 1.1.9)
6+
contracts (= 0.16.0)
7+
faraday (>= 0.17.3, < 0.18)
8+
net-ldap (~> 0.17.0)
9+
octokit (~> 4.18)
10+
optimist (= 3.0.0)
11+
12+
GEM
13+
remote: https://rubygems.org/
14+
specs:
15+
activesupport (6.1.6)
16+
concurrent-ruby (~> 1.0, >= 1.0.2)
17+
i18n (>= 1.6, < 2)
18+
minitest (>= 5.1)
19+
tzinfo (~> 2.0)
20+
zeitwerk (~> 2.3)
21+
addressable (2.8.0)
22+
public_suffix (>= 2.0.2, < 5.0)
23+
ast (2.4.2)
24+
concurrent-ruby (1.1.9)
25+
contracts (0.16.0)
26+
contracts-rspec (0.1.0)
27+
crack (0.4.5)
28+
rexml
29+
diff-lcs (1.4.4)
30+
docile (1.4.0)
31+
entitlements (0.1.5.g6c8e3a79)
32+
concurrent-ruby (= 1.1.9)
33+
contracts (= 0.16.0)
34+
faraday (>= 0.17.3, < 0.18)
35+
net-ldap (~> 0.17.0)
36+
octokit (~> 4.18)
37+
optimist (= 3.0.0)
38+
faraday (0.17.4)
39+
multipart-post (>= 1.2, < 3)
40+
hashdiff (1.0.1)
41+
i18n (1.10.0)
42+
concurrent-ruby (~> 1.0)
43+
json (2.6.1)
44+
minitest (5.15.0)
45+
multipart-post (2.1.1)
46+
net-ldap (0.17.0)
47+
octokit (4.21.0)
48+
faraday (>= 0.9)
49+
sawyer (~> 0.8.0, >= 0.5.3)
50+
optimist (3.0.0)
51+
parallel (1.22.1)
52+
parser (3.1.2.0)
53+
ast (~> 2.4.1)
54+
public_suffix (4.0.6)
55+
rack (2.2.3)
56+
rainbow (3.1.1)
57+
rake (13.0.6)
58+
regexp_parser (2.4.0)
59+
rexml (3.2.5)
60+
rspec (3.8.0)
61+
rspec-core (~> 3.8.0)
62+
rspec-expectations (~> 3.8.0)
63+
rspec-mocks (~> 3.8.0)
64+
rspec-core (3.8.0)
65+
rspec-support (~> 3.8.0)
66+
rspec-expectations (3.8.6)
67+
diff-lcs (>= 1.2.0, < 2.0)
68+
rspec-support (~> 3.8.0)
69+
rspec-mocks (3.8.2)
70+
diff-lcs (>= 1.2.0, < 2.0)
71+
rspec-support (~> 3.8.0)
72+
rspec-support (3.8.3)
73+
rubocop (1.29.1)
74+
parallel (~> 1.10)
75+
parser (>= 3.1.0.0)
76+
rainbow (>= 2.2.2, < 4.0)
77+
regexp_parser (>= 1.8, < 3.0)
78+
rexml (>= 3.2.5, < 4.0)
79+
rubocop-ast (>= 1.17.0, < 2.0)
80+
ruby-progressbar (~> 1.7)
81+
unicode-display_width (>= 1.4.0, < 3.0)
82+
rubocop-ast (1.18.0)
83+
parser (>= 3.1.1.0)
84+
rubocop-github (0.17.0)
85+
rubocop
86+
rubocop-performance
87+
rubocop-rails
88+
rubocop-performance (1.13.3)
89+
rubocop (>= 1.7.0, < 2.0)
90+
rubocop-ast (>= 0.4.0)
91+
rubocop-rails (2.14.2)
92+
activesupport (>= 4.2.0)
93+
rack (>= 1.1)
94+
rubocop (>= 1.7.0, < 2.0)
95+
ruby-progressbar (1.11.0)
96+
rugged (0.27.5)
97+
sawyer (0.8.2)
98+
addressable (>= 2.3.5)
99+
faraday (> 0.8, < 2.0)
100+
simplecov (0.16.1)
101+
docile (~> 1.1)
102+
json (>= 1.8, < 3)
103+
simplecov-html (~> 0.10.0)
104+
simplecov-erb (0.1.1)
105+
simplecov
106+
simplecov-html (0.10.2)
107+
tzinfo (2.0.4)
108+
concurrent-ruby (~> 1.0)
109+
unicode-display_width (2.1.0)
110+
vcr (4.0.0)
111+
webmock (3.4.2)
112+
addressable (>= 2.3.6)
113+
crack (>= 0.3.2)
114+
hashdiff
115+
zeitwerk (2.5.4)
116+
117+
PLATFORMS
118+
ruby
119+
x86_64-darwin-19
120+
121+
DEPENDENCIES
122+
contracts-rspec (= 0.1.0)
123+
entitlements (= 0.1.5.g6c8e3a79)
124+
entitlements-gitrepo-auditor-plugin!
125+
rake (= 13.0.6)
126+
rspec (= 3.8.0)
127+
rspec-core (= 3.8.0)
128+
rubocop (= 1.29.1)
129+
rubocop-github (= 0.17.0)
130+
rubocop-performance (= 1.13.3)
131+
rugged (= 0.27.5)
132+
simplecov (= 0.16.1)
133+
simplecov-erb (= 0.1.1)
134+
vcr (= 4.0.0)
135+
webmock (= 3.4.2)
136+
137+
BUNDLED WITH
138+
2.2.24

0 commit comments

Comments
 (0)