Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/golang.org/x/net-0.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper authored Jun 5, 2024
2 parents 86ae2a9 + 57d6b8f commit e46b6ea
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pr-title-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ jobs:

steps:
- name: validate title
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
echo "${{ github.event.pull_request.title }}" | grep -Eq '^(feat|fix|chore|refactor|enhance|test|docs)(\(.*\)|):\s.+$' && (echo "Pass"; exit 0) || (echo "Incorrect Format. Please see https://go-vela.github.io/docs/community/contributing_guidelines/#development-workflow"; exit 1)
echo "$TITLE" | grep -Eq '^(feat|fix|chore|refactor|enhance|test|docs)(\(.*\)|)!?:\s.+$' && (echo "Pass"; exit 0) || (echo "Incorrect Format. Please see https://go-vela.github.io/docs/community/contributing_guidelines/#development-workflow"; exit 1)
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ linters:
- bidichk # checks for dangerous unicode character sequences
- bodyclose # checks whether HTTP response body is closed successfully
- contextcheck # check the function whether use a non-inherited context
- deadcode # finds unused code
- dupl # code clone detection
- errcheck # checks for unchecked errors
- errorlint # find misuses of errors
Expand All @@ -101,14 +100,12 @@ linters:
- nolintlint # reports ill-formed or insufficient nolint directives
- revive # linter for go
- staticcheck # applies static analysis checks, go vet on steroids
- structcheck # finds unused struct fields
- stylecheck # replacement for golint
- tenv # analyzer that detects using os.Setenv instead of t.Setenv since Go1.17
- typecheck # parses and type-checks go code, like the front-end of a go compiler
- unconvert # remove unnecessary type conversions
- unparam # reports unused function parameters
- unused # checks for unused constants, variables, functions and types
- varcheck # finds unused global variables and constants
- whitespace # detects leading and trailing whitespace
- wsl # forces code to use empty lines

Expand Down
4 changes: 3 additions & 1 deletion pipeline/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type (
Volumes VolumeSlice `json:"volumes,omitempty" yaml:"volumes,omitempty"`
User string `json:"user,omitempty" yaml:"user,omitempty"`
ReportAs string `json:"report_as,omitempty" yaml:"report_as,omitempty"`
IDRequest string `json:"id_request,omitempty" yaml:"id_request,omitempty"`
}
)

Expand Down Expand Up @@ -135,7 +136,8 @@ func (c *Container) Empty() bool {
len(c.Ulimits) == 0 &&
len(c.Volumes) == 0 &&
len(c.User) == 0 &&
len(c.ReportAs) == 0 {
len(c.ReportAs) == 0 &&
len(c.IDRequest) == 0 {
return true
}

Expand Down
1 change: 1 addition & 0 deletions pipeline/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ func testContainers() *ContainerSlice {
Name: "clone",
Number: 2,
Pull: "always",
IDRequest: "yes",
},
{
ID: "step_github/octocat._1_echo",
Expand Down
2 changes: 2 additions & 0 deletions yaml/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type (
Privileged bool `yaml:"privileged,omitempty" json:"privileged,omitempty" jsonschema:"description=Run the container with extra privileges.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-privileged-tag"`
User string `yaml:"user,omitempty" json:"user,omitempty" jsonschema:"description=Set the user for the container.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-user-tag"`
ReportAs string `yaml:"report_as,omitempty" json:"report_as,omitempty" jsonschema:"description=Set the name of the step to report as.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-report_as-tag"`
IDRequest string `yaml:"id_request,omitempty" json:"id_request,omitempty" jsonschema:"description=Request ID Request Token for the step.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-id_request-tag"`
}
)

Expand Down Expand Up @@ -62,6 +63,7 @@ func (s *StepSlice) ToPipeline() *pipeline.ContainerSlice {
Volumes: *step.Volumes.ToPipeline(),
User: step.User,
ReportAs: step.ReportAs,
IDRequest: step.IDRequest,
})
}

Expand Down
2 changes: 2 additions & 0 deletions yaml/step_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func TestYaml_StepSlice_ToPipeline(t *testing.T) {
Privileged: false,
Pull: "not_present",
ReportAs: "my-step",
IDRequest: "yes",
Ruleset: Ruleset{
If: Rules{
Branch: []string{"main"},
Expand Down Expand Up @@ -88,6 +89,7 @@ func TestYaml_StepSlice_ToPipeline(t *testing.T) {
Privileged: false,
Pull: "not_present",
ReportAs: "my-step",
IDRequest: "yes",
Ruleset: pipeline.Ruleset{
If: pipeline.Rules{
Branch: []string{"main"},
Expand Down

0 comments on commit e46b6ea

Please sign in to comment.