ninny 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac4912e477ddf25380dd14cbf7dad07184c9b7f002d781e781917112f45cc013
4
- data.tar.gz: 6a144e8bd809018812ad9f441aa39db5c7853bb3e0d9224bdc50eef1d6633f78
3
+ metadata.gz: eb06f88a85ed100c85f035dfd512eab3a653ce976e4fccfcb75972b94b62a941
4
+ data.tar.gz: 624b6561506f6431afbf5e0b63963c056d028ddfaa4499397a0a943d0cafe221
5
5
  SHA512:
6
- metadata.gz: 436dd448436ce48fe2658d08b3cc68b1aedbda86796c836131b8f9845af39507ff99c806f276edafeebe57799db7086ff667c17a509466ec83ab38df22d7796a
7
- data.tar.gz: dedd4a379d28c591424f2c40e7255d1151a278f9e8d2b1df7269ee5996edeb9d26339bf4f41582907acba0d06733b16b698a12a2364295b237ea33c9e9659273
6
+ metadata.gz: b984582630919dc9b6ae834d113e3ff3adea6402cacc0051201985021634baf6b7e7aaae0987acd5a03753d29066786fd469356ab4d77f4bdb09deada6aa684c
7
+ data.tar.gz: 7ca0603113e71a573636d6efe74e9960d8cabbb6cbc43ed9ad25b5bc84c18dcd658098adeee60bd99b5fd81904822049ae647677e76a266fe11bc207f1c7c6a3
@@ -0,0 +1,8 @@
1
+ [allowlist]
2
+ description = 'A list of commits and secrets to skip when scanning for secrets'
3
+ commits = [
4
+ 'ExampleCommit'
5
+ ]
6
+ regexes = [
7
+ 'ExampleSecret'
8
+ ]
@@ -5,6 +5,9 @@ on:
5
5
  pull_request:
6
6
  branches: [ main ]
7
7
 
8
+ env:
9
+ GITLEAKS_REF: f15b4e408b12fda7e2833f8a32c0d8a045bd48a0
10
+
8
11
  jobs:
9
12
  test:
10
13
  runs-on: ubuntu-latest
@@ -31,3 +34,32 @@ jobs:
31
34
  - uses: HeRoMo/pronto-action@v1.13.0
32
35
  with:
33
36
  github_token: ${{ secrets.GITHUB_TOKEN }}
37
+ gitleaks:
38
+ if: github.EVENT_NAME == 'pull_request'
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v2
42
+ with:
43
+ fetch-depth: 0
44
+ - run: |
45
+ curl -H "Accept: application/vnd.github.v3.raw" \
46
+ -L "https://api.github.com/repos/zricethezav/gitleaks/contents/config/gitleaks.toml?ref=${{ env.GITLEAKS_REF }}" \
47
+ >> ${{ github.WORKSPACE }}/.github/workflows/original.toml
48
+ sed "/\[allowlist\]/,/^$/d" ${{ github.WORKSPACE }}/.github/workflows/original.toml >> ${{ github.WORKSPACE }}/.github/workflows/official.toml
49
+ cat .github/workflows/gitleaks.toml >> .github/workflows/official.toml
50
+ if [[ ${{ github.REF }} == 'refs/heads/main' ]]; then
51
+ CURRENT_COMMIT="${{ github.SHA }}"
52
+ else
53
+ CURRENT_COMMIT="${{ github.EVENT.PULL_REQUEST.HEAD.SHA }}"
54
+ fi
55
+ echo "LOG_OPTS='^origin/main $CURRENT_COMMIT'" >> $GITHUB_ENV
56
+ - name: GitLeaks
57
+ uses: addnab/docker-run-action@v3
58
+ with:
59
+ image: zricethezav/gitleaks:v8.0.4
60
+ options: -v ${{ github.WORKSPACE }}:/app
61
+ run: |
62
+ cd /app
63
+ gitleaks detect --verbose --source='./' \
64
+ --config='.github/workflows/official.toml' \
65
+ --log-opts=${{ env.LOG_OPTS }}
@@ -22,7 +22,7 @@ module Ninny
22
22
  target_branch: Ninny.project_config.deploy_branch,
23
23
  state: 'opened'
24
24
  }
25
- ).last
25
+ ).auto_paginate.last
26
26
  )
27
27
  end
28
28
 
@@ -31,7 +31,7 @@ module Ninny
31
31
  end
32
32
 
33
33
  def open_pull_requests
34
- gitlab.merge_requests(project_id, { state: 'opened' }).map { |mr| to_pr(mr) }
34
+ gitlab.merge_requests(project_id, { state: 'opened' }).auto_paginate.map { |mr| to_pr(mr) }
35
35
  end
36
36
 
37
37
  def pull_request(id)
data/lib/ninny/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ninny
4
- VERSION = '0.1.18'
4
+ VERSION = '0.1.19'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ninny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dispatch Engineers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-20 00:00:00.000000000 Z
11
+ date: 2021-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -272,6 +272,7 @@ extra_rdoc_files: []
272
272
  files:
273
273
  - ".github/pull_request_template.md"
274
274
  - ".github/workflows/build.yml"
275
+ - ".github/workflows/gitleaks.toml"
275
276
  - ".github/workflows/scheduled.yml"
276
277
  - ".github/workflows/test.yml"
277
278
  - ".gitignore"