Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(scheduler): add SkipDraftPR from lighthouse v0.0.1109 #956

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/plugins-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.6'
go-version: '1.22.1'
- run: make ${{ matrix.target }}
- run: |
./build/${{ matrix.target }}/${{ matrix.binary }} version
Expand Down
42 changes: 20 additions & 22 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
linters-settings:
depguard:
list-type: blacklist
packages:
- github.com/jenkins-x/jx/v2/pkg/log/
- github.com/satori/go.uuid
- github.com/pborman/uuid
packages-with-error-message:
- github.com/jenkins-x/jx/v2/pkg/log/: "use jenkins-x/jx-logging instead"
- github.com/satori/go.uuid: "use github.com/google/uuid instead"
- github.com/pborman/uuid: "use github.com/google/uuid instead"
depguard: # https://github.com/kedacore/keda/issues/4980
rules:
main:
deny:
- pkg: sync/atomic
desc: "use type-safe atomics from go.uber.org/atomic"
dupl:
threshold: 100
exhaustive:
Expand Down Expand Up @@ -42,12 +38,16 @@ linters-settings:
gofmt:
simplify: true
gomnd:
settings:
mnd:
# don't include the "operation" and "assign"
checks: [argument, case, condition, return]
# `linters.gomnd.settings` is deprecated. Please use the options `linters.gomnd.checks`,`linters.gomnd.ignored-numbers`,`linters.gomnd.ignored-files`,`linters.gomnd.ignored-functions`
# don't include the "operation" and "assign"
checks:
- argument
- case
- condition
- return
govet:
check-shadowing: true
# `linters.govet.check-shadowing` is deprecated. Please enable `shadow` instead
shadow: true
settings:
printf:
funcs:
Expand All @@ -73,8 +73,7 @@ linters:
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- depguard
- errcheck
- gofmt
- goimports
Expand All @@ -86,17 +85,18 @@ linters:
- nakedret
- rowserrcheck
- staticcheck
- structcheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- revive
- gocritic
- govet
- dupl
issues:
# `run.skip-dirs` is deprecated, please use `issues.exclude-dirs`
exclude-dirs:
- cmd/docs
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# - path: _test\.go
Expand All @@ -111,11 +111,9 @@ issues:
max-same-issues: 0
run:
timeout: 30m
skip-dirs:
- cmd/docs
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.42.x # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: 1.57.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
4 changes: 4 additions & 0 deletions .lighthouse/jenkins-x/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ spec:
name: ""
resources: {}
- name: make-lint
image: golangci/golangci-lint:v1.57.2
resources:
requests:
cpu: 1600m
memory: 1400Mi
script: |
#!/bin/sh
golangci-lint run
podTemplate: {}
serviceAccountName: tekton-bot
timeout: 60m0s
Expand Down
13 changes: 11 additions & 2 deletions .lighthouse/jenkins-x/pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ spec:
resources: {}
- name: jx-variables
resources: {}
- name: build-make-linux
- image: golang:1.22.1
name: build-make-linux
resources: {}
- name: build-make-test
script: |
#!/bin/sh
make linux
- image: golang:1.22.1
name: build-make-test
resources: {}
script: |
#!/bin/bash
source .jx/variables.sh
make test
- name: build-container-build
resources: {}
podTemplate: {}
Expand Down
13 changes: 12 additions & 1 deletion docs/scheduler-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,17 @@ bool
that could run but do not run.</p>
</td>
</tr>
<tr>
<td>
<code>skip_draft_pr</code></br>
<em>
bool
</em>
</td>
<td>
<p>SkipDraftPR when enabled, skips triggering pipelines for draft PRs, unless /ok-to-test is added.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="scheduler.jenkins-x.io/v1alpha1.Welcome">Welcome
Expand Down Expand Up @@ -2036,5 +2047,5 @@ string
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>100093a8</code>.
on git commit <code>4184d641</code>.
</em></p>
Loading
Loading