diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c54945f4..31c8ad7c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,9 +21,9 @@ updates: - dependency-type: "all" groups: docker: - patterns: - - "github.com/docker/*" - - "github.com/moby/*" + patterns: + - "github.com/docker/*" + - "github.com/moby/*" all: patterns: - "*" @@ -37,4 +37,3 @@ updates: all: patterns: - "*" - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 839e63e2..a8fab215 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI Build + Unit Test -on: +on: # yamllint disable-line rule:truthy push: branches: ["main"] pull_request: @@ -15,6 +15,9 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + # yamllint is installed in GitHub Actions base runner image: https://github.com/adrienverge/yamllint/pull/588 + - run: yamllint . + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 with: go-version-file: go.mod diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf1c220e..54e49666 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ name: Release binary builder -on: +on: # yamllint disable-line rule:truthy release: types: [published] diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index d40ec2e4..8d32989f 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -1,6 +1,6 @@ name: Scorecard analysis -on: +on: # yamllint disable-line rule:truthy push: branches: - main diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index acc1828c..6ea3de72 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -1,7 +1,7 @@ # Runs all ecosystems cached and concurrently. name: Smoke -on: +on: # yamllint disable-line rule:truthy workflow_dispatch: pull_request: diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 00000000..fac4803d --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,11 @@ +--- +extends: default + +rules: + comments: + min-spaces-from-content: 1 + comments-indentation: disable + document-start: disable + indentation: + indent-sequences: consistent + line-length: disable diff --git a/testdata/basic.yml b/testdata/basic.yml index 4bcc56b4..7c4a7d1e 100644 --- a/testdata/basic.yml +++ b/testdata/basic.yml @@ -12,4 +12,3 @@ credentials: host: github.com username: x-access-token password: $LOCAL_GITHUB_ACCESS_TOKEN - diff --git a/testdata/go/allow-go.yaml b/testdata/go/allow-go.yaml index 1a9e7952..334938f5 100644 --- a/testdata/go/allow-go.yaml +++ b/testdata/go/allow-go.yaml @@ -1,112 +1,112 @@ input: - job: - package-manager: go_modules - allowed-updates: - - dependency-name: github.com/fatih/color - source: - provider: github - repo: dependabot/smoke-tests - directory: / - commit: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + job: + package-manager: go_modules + allowed-updates: + - dependency-name: github.com/fatih/color + source: + provider: github + repo: dependabot/smoke-tests + directory: / + commit: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 output: - type: update_dependency_list expect: - data: - dependencies: - - name: github.com/fatih/color - requirements: - - file: go.mod - groups: [] - requirement: v1.7.0 - source: - source: github.com/fatih/color - type: default - version: 1.7.0 - - name: rsc.io/qr - requirements: [] - version: 0.1.0 - - name: rsc.io/quote - requirements: - - file: go.mod - groups: [] - requirement: v1.4.0 - source: - source: rsc.io/quote - type: default - version: 1.4.0 - dependency_files: - - /go.mod - - /go.sum + data: + dependencies: + - name: github.com/fatih/color + requirements: + - file: go.mod + groups: [] + requirement: v1.7.0 + source: + source: github.com/fatih/color + type: default + version: 1.7.0 + - name: rsc.io/qr + requirements: [] + version: 0.1.0 + - name: rsc.io/quote + requirements: + - file: go.mod + groups: [] + requirement: v1.4.0 + source: + source: rsc.io/quote + type: default + version: 1.4.0 + dependency_files: + - /go.mod + - /go.sum - type: create_pull_request expect: - data: - base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 - dependencies: - - name: github.com/fatih/color - previous-requirements: - - file: go.mod - groups: [] - requirement: v1.7.0 - source: - source: github.com/fatih/color - type: default - previous-version: 1.7.0 - requirements: - - file: go.mod - groups: [] - requirement: 1.13.0 - source: - source: github.com/fatih/color - type: default - version: 1.13.0 - updated-dependency-files: - - content: | - module github.com/dependabot/vgotest + data: + base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + dependencies: + - name: github.com/fatih/color + previous-requirements: + - file: go.mod + groups: [] + requirement: v1.7.0 + source: + source: github.com/fatih/color + type: default + previous-version: 1.7.0 + requirements: + - file: go.mod + groups: [] + requirement: 1.13.0 + source: + source: github.com/fatih/color + type: default + version: 1.13.0 + updated-dependency-files: + - content: | + module github.com/dependabot/vgotest - go 1.12 + go 1.12 - require ( - github.com/fatih/color v1.13.0 - golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect - rsc.io/qr v0.1.0 - rsc.io/quote v1.4.0 - ) + require ( + github.com/fatih/color v1.13.0 + golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect + rsc.io/qr v0.1.0 + rsc.io/quote v1.4.0 + ) - replace rsc.io/qr => github.com/rsc/qr v0.2.0 - content_encoding: utf-8 - deleted: false - directory: / - name: go.mod - operation: update - support_file: false - type: file - - content: | - github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= - github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= - github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U= - github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= - github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= - github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= - github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= - github.com/rsc/qr v0.2.0 h1:tH61+huiZvu+hXL1VUovAu2AnhdG4eJQk2+on3XsDBQ= - github.com/rsc/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= - golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= - golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - rsc.io/quote v1.4.0 h1:tYuJspOzwTRMUOX6qmSDRTEKFVV80GM0/l89OLZuVNg= - rsc.io/quote v1.4.0/go.mod h1:S2vMDfxMfk+OGQ7xf1uNqJCSuSPCW5QC127LHYfOJmQ= - rsc.io/sampler v1.0.0 h1:CZX0Ury6np11Lwls9Jja2rFf3YrNPeUPAWiEVrJ0u/4= - rsc.io/sampler v1.0.0/go.mod h1:cqxpM3ZVz9VtirqxZPmrWzkQ+UkiNiGtkrN+B+i8kx8= - content_encoding: utf-8 - deleted: false - directory: / - name: go.sum - operation: update - support_file: false - type: file + replace rsc.io/qr => github.com/rsc/qr v0.2.0 + content_encoding: utf-8 + deleted: false + directory: / + name: go.mod + operation: update + support_file: false + type: file + - content: | + github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= + github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= + github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U= + github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= + github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= + github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= + github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= + github.com/rsc/qr v0.2.0 h1:tH61+huiZvu+hXL1VUovAu2AnhdG4eJQk2+on3XsDBQ= + github.com/rsc/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= + golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= + golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + rsc.io/quote v1.4.0 h1:tYuJspOzwTRMUOX6qmSDRTEKFVV80GM0/l89OLZuVNg= + rsc.io/quote v1.4.0/go.mod h1:S2vMDfxMfk+OGQ7xf1uNqJCSuSPCW5QC127LHYfOJmQ= + rsc.io/sampler v1.0.0 h1:CZX0Ury6np11Lwls9Jja2rFf3YrNPeUPAWiEVrJ0u/4= + rsc.io/sampler v1.0.0/go.mod h1:cqxpM3ZVz9VtirqxZPmrWzkQ+UkiNiGtkrN+B+i8kx8= + content_encoding: utf-8 + deleted: false + directory: / + name: go.sum + operation: update + support_file: false + type: file - type: mark_as_processed expect: - data: - base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + data: + base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 diff --git a/testdata/go/close-pr.yaml b/testdata/go/close-pr.yaml index c5cfa85d..10783d77 100644 --- a/testdata/go/close-pr.yaml +++ b/testdata/go/close-pr.yaml @@ -1,51 +1,51 @@ input: - job: - package-manager: go_modules - dependencies: - - none - security-updates-only: true - source: - provider: github - repo: dependabot/smoke-tests - directory: / - commit: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 - updating-a-pull-request: true + job: + package-manager: go_modules + dependencies: + - none + security-updates-only: true + source: + provider: github + repo: dependabot/smoke-tests + directory: / + commit: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + updating-a-pull-request: true output: - type: update_dependency_list expect: - data: - dependencies: - - name: github.com/fatih/color - requirements: - - file: go.mod - groups: [] - requirement: v1.7.0 - source: - source: github.com/fatih/color - type: default - version: 1.7.0 - - name: rsc.io/qr - requirements: [] - version: 0.1.0 - - name: rsc.io/quote - requirements: - - file: go.mod - groups: [] - requirement: v1.4.0 - source: - source: rsc.io/quote - type: default - version: 1.4.0 - dependency_files: - - /go.mod - - /go.sum + data: + dependencies: + - name: github.com/fatih/color + requirements: + - file: go.mod + groups: [] + requirement: v1.7.0 + source: + source: github.com/fatih/color + type: default + version: 1.7.0 + - name: rsc.io/qr + requirements: [] + version: 0.1.0 + - name: rsc.io/quote + requirements: + - file: go.mod + groups: [] + requirement: v1.4.0 + source: + source: rsc.io/quote + type: default + version: 1.4.0 + dependency_files: + - /go.mod + - /go.sum - type: close_pull_request expect: - data: - dependency-names: - - none - reason: dependency_removed + data: + dependency-names: + - none + reason: dependency_removed - type: mark_as_processed expect: - data: - base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + data: + base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 diff --git a/testdata/go/security-go.yaml b/testdata/go/security-go.yaml index a6eae9c4..607b5f55 100644 --- a/testdata/go/security-go.yaml +++ b/testdata/go/security-go.yaml @@ -1,117 +1,117 @@ input: - job: - package-manager: go_modules - allowed-updates: - - update-type: all - security-advisories: - - dependency-name: github.com/fatih/color - affected-versions: - - <1.10.0 - patched-versions: [] - unaffected-versions: [] - security-updates-only: true - source: - provider: github - repo: dependabot/smoke-tests - directory: / - commit: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + job: + package-manager: go_modules + allowed-updates: + - update-type: all + security-advisories: + - dependency-name: github.com/fatih/color + affected-versions: + - <1.10.0 + patched-versions: [] + unaffected-versions: [] + security-updates-only: true + source: + provider: github + repo: dependabot/smoke-tests + directory: / + commit: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 output: - type: update_dependency_list expect: - data: - dependencies: - - name: github.com/fatih/color - requirements: - - file: go.mod - groups: [] - requirement: v1.7.0 - source: - source: github.com/fatih/color - type: default - version: 1.7.0 - - name: rsc.io/qr - requirements: [] - version: 0.1.0 - - name: rsc.io/quote - requirements: - - file: go.mod - groups: [] - requirement: v1.4.0 - source: - source: rsc.io/quote - type: default - version: 1.4.0 - dependency_files: - - /go.mod - - /go.sum + data: + dependencies: + - name: github.com/fatih/color + requirements: + - file: go.mod + groups: [] + requirement: v1.7.0 + source: + source: github.com/fatih/color + type: default + version: 1.7.0 + - name: rsc.io/qr + requirements: [] + version: 0.1.0 + - name: rsc.io/quote + requirements: + - file: go.mod + groups: [] + requirement: v1.4.0 + source: + source: rsc.io/quote + type: default + version: 1.4.0 + dependency_files: + - /go.mod + - /go.sum - type: create_pull_request expect: - data: - base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 - dependencies: - - name: github.com/fatih/color - previous-requirements: - - file: go.mod - groups: [] - requirement: v1.7.0 - source: - source: github.com/fatih/color - type: default - previous-version: 1.7.0 - requirements: - - file: go.mod - groups: [] - requirement: 1.13.0 - source: - source: github.com/fatih/color - type: default - version: 1.10.0 - updated-dependency-files: - - content: | - module github.com/dependabot/vgotest + data: + base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + dependencies: + - name: github.com/fatih/color + previous-requirements: + - file: go.mod + groups: [] + requirement: v1.7.0 + source: + source: github.com/fatih/color + type: default + previous-version: 1.7.0 + requirements: + - file: go.mod + groups: [] + requirement: 1.13.0 + source: + source: github.com/fatih/color + type: default + version: 1.10.0 + updated-dependency-files: + - content: | + module github.com/dependabot/vgotest - go 1.12 + go 1.12 - require ( - github.com/fatih/color v1.10.0 - golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect - rsc.io/qr v0.1.0 - rsc.io/quote v1.4.0 - ) + require ( + github.com/fatih/color v1.10.0 + golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect + rsc.io/qr v0.1.0 + rsc.io/quote v1.4.0 + ) - replace rsc.io/qr => github.com/rsc/qr v0.2.0 - content_encoding: utf-8 - deleted: false - directory: / - name: go.mod - operation: update - support_file: false - type: file - - content: | - github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= - github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= - github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= - github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= - github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= - github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= - github.com/rsc/qr v0.2.0 h1:tH61+huiZvu+hXL1VUovAu2AnhdG4eJQk2+on3XsDBQ= - github.com/rsc/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= - golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= - golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - rsc.io/quote v1.4.0 h1:tYuJspOzwTRMUOX6qmSDRTEKFVV80GM0/l89OLZuVNg= - rsc.io/quote v1.4.0/go.mod h1:S2vMDfxMfk+OGQ7xf1uNqJCSuSPCW5QC127LHYfOJmQ= - rsc.io/sampler v1.0.0 h1:CZX0Ury6np11Lwls9Jja2rFf3YrNPeUPAWiEVrJ0u/4= - rsc.io/sampler v1.0.0/go.mod h1:cqxpM3ZVz9VtirqxZPmrWzkQ+UkiNiGtkrN+B+i8kx8= - content_encoding: utf-8 - deleted: false - directory: / - name: go.sum - operation: update - support_file: false - type: file + replace rsc.io/qr => github.com/rsc/qr v0.2.0 + content_encoding: utf-8 + deleted: false + directory: / + name: go.mod + operation: update + support_file: false + type: file + - content: | + github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= + github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= + github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= + github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= + github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= + github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= + github.com/rsc/qr v0.2.0 h1:tH61+huiZvu+hXL1VUovAu2AnhdG4eJQk2+on3XsDBQ= + github.com/rsc/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= + golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= + golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + rsc.io/quote v1.4.0 h1:tYuJspOzwTRMUOX6qmSDRTEKFVV80GM0/l89OLZuVNg= + rsc.io/quote v1.4.0/go.mod h1:S2vMDfxMfk+OGQ7xf1uNqJCSuSPCW5QC127LHYfOJmQ= + rsc.io/sampler v1.0.0 h1:CZX0Ury6np11Lwls9Jja2rFf3YrNPeUPAWiEVrJ0u/4= + rsc.io/sampler v1.0.0/go.mod h1:cqxpM3ZVz9VtirqxZPmrWzkQ+UkiNiGtkrN+B+i8kx8= + content_encoding: utf-8 + deleted: false + directory: / + name: go.sum + operation: update + support_file: false + type: file - type: mark_as_processed expect: - data: - base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + data: + base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 diff --git a/testdata/go/update-pr.yaml b/testdata/go/update-pr.yaml index a9150939..014e9693 100644 --- a/testdata/go/update-pr.yaml +++ b/testdata/go/update-pr.yaml @@ -1,108 +1,108 @@ input: - job: - package-manager: go_modules - allowed-updates: - - update-type: all - dependencies: - - rsc.io/quote - existing-pull-requests: - - - dependency-name: rsc.io/quote - dependency-version: 1.5.2 - ignore-conditions: - - dependency-name: github.com/fatih/color - source: tests/go/update-pr.yaml - - dependency-name: rsc.io/quote - source: tests/go/update-pr.yaml - version-requirement: '>1.9.0' - source: - provider: github - repo: dependabot/smoke-tests - directory: / - commit: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 - updating-a-pull-request: true + job: + package-manager: go_modules + allowed-updates: + - update-type: all + dependencies: + - rsc.io/quote + existing-pull-requests: + - - dependency-name: rsc.io/quote + dependency-version: 1.5.2 + ignore-conditions: + - dependency-name: github.com/fatih/color + source: tests/go/update-pr.yaml + - dependency-name: rsc.io/quote + source: tests/go/update-pr.yaml + version-requirement: ">1.9.0" + source: + provider: github + repo: dependabot/smoke-tests + directory: / + commit: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + updating-a-pull-request: true output: - type: update_dependency_list expect: - data: - dependencies: - - name: github.com/fatih/color - requirements: - - file: go.mod - groups: [] - requirement: v1.7.0 - source: - source: github.com/fatih/color - type: default - version: 1.7.0 - - name: rsc.io/qr - requirements: [] - version: 0.1.0 - - name: rsc.io/quote - requirements: - - file: go.mod - groups: [] - requirement: v1.4.0 - source: - source: rsc.io/quote - type: default - version: 1.4.0 - dependency_files: - - /go.mod - - /go.sum + data: + dependencies: + - name: github.com/fatih/color + requirements: + - file: go.mod + groups: [] + requirement: v1.7.0 + source: + source: github.com/fatih/color + type: default + version: 1.7.0 + - name: rsc.io/qr + requirements: [] + version: 0.1.0 + - name: rsc.io/quote + requirements: + - file: go.mod + groups: [] + requirement: v1.4.0 + source: + source: rsc.io/quote + type: default + version: 1.4.0 + dependency_files: + - /go.mod + - /go.sum - type: update_pull_request expect: - data: - base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 - dependency-names: - - rsc.io/quote - updated-dependency-files: - - content: | - module github.com/dependabot/vgotest + data: + base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + dependency-names: + - rsc.io/quote + updated-dependency-files: + - content: | + module github.com/dependabot/vgotest - go 1.12 + go 1.12 - require ( - github.com/fatih/color v1.7.0 - github.com/mattn/go-colorable v0.0.9 // indirect - github.com/mattn/go-isatty v0.0.4 // indirect - golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect - rsc.io/qr v0.1.0 - rsc.io/quote v1.5.2 - ) + require ( + github.com/fatih/color v1.7.0 + github.com/mattn/go-colorable v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.4 // indirect + golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect + rsc.io/qr v0.1.0 + rsc.io/quote v1.5.2 + ) - replace rsc.io/qr => github.com/rsc/qr v0.2.0 - content_encoding: utf-8 - deleted: false - directory: / - name: go.mod - operation: update - support_file: false - type: file - - content: | - github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= - github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= - github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= - github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= - github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= - github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= - github.com/rsc/qr v0.2.0 h1:tH61+huiZvu+hXL1VUovAu2AnhdG4eJQk2+on3XsDBQ= - github.com/rsc/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= - golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= - golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkL0i8= - golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= - rsc.io/quote v1.5.2 h1:w5fcysjrx7yqtD/aO+QwRjYZOKnaM9Uh2b40tElTs3Y= - rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0= - rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= - rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= - content_encoding: utf-8 - deleted: false - directory: / - name: go.sum - operation: update - support_file: false - type: file + replace rsc.io/qr => github.com/rsc/qr v0.2.0 + content_encoding: utf-8 + deleted: false + directory: / + name: go.mod + operation: update + support_file: false + type: file + - content: | + github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= + github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= + github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= + github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= + github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= + github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= + github.com/rsc/qr v0.2.0 h1:tH61+huiZvu+hXL1VUovAu2AnhdG4eJQk2+on3XsDBQ= + github.com/rsc/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= + golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= + golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkL0i8= + golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= + rsc.io/quote v1.5.2 h1:w5fcysjrx7yqtD/aO+QwRjYZOKnaM9Uh2b40tElTs3Y= + rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0= + rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= + rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= + content_encoding: utf-8 + deleted: false + directory: / + name: go.sum + operation: update + support_file: false + type: file - type: mark_as_processed expect: - data: - base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994 + data: + base-commit-sha: 832e37c1a7a4ef89feb9dc7cfa06f62205191994