Skip to content
Closed
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
50 changes: 42 additions & 8 deletions .github/workflows/api-diff.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,64 @@
name: Analyze API Changes

on:
push:
branches:
- main
pull_request:

jobs:
root-module:
name: Root Module
changed-modules:
name: Determine Changed Modules
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
pull-requests: read
outputs:
modules-json: ${{ steps.changed-modules.outputs.modules-json }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Changed modules
id: changed-modules
uses: smartcontractkit/.github/actions/changed-modules-go@changed-modules-go/v1
with:
file-patterns: |
**/*.go
**/go.mod
**/go.sum
module-patterns: |
**

analyze-api-changes:
name: Analyze (${{ matrix.module }})
runs-on: ubuntu-latest
needs: changed-modules
permissions:
pull-requests: write
contents: read
strategy:
fail-fast: false
matrix:
module: ${{ fromJson(needs.changed-modules.outputs.modules-json) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
go-version-file: ${{ matrix.module }}/go.mod
cache: false

- uses: smartcontractkit/.github/actions/apidiff-go@apidiff-go/v1
- uses: smartcontractkit/.github/actions/apidiff-go@apidiff-go/v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
go-mod-paths: "./"
enforce-compatible: "false" # dont fail on breaking changes
module-directory: ${{ matrix.module }}
enforce-compatible: false
post-comment: true
6 changes: 4 additions & 2 deletions keystore/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ var _ Storage = &FileStorage{}

// FileStorage implements Storage using a file
type FileStorage struct {
name string
name string
Example bool
}

func NewFileStorage(name string) *FileStorage {
return &FileStorage{
name: name,
name: name,
Example: false,
}
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type clientConfig interface {

// NewRestrictedClient returns a secure HTTP Client (queries to certain
// local addresses are blocked)
func NewRestrictedClient(cfg clientConfig, lggr logger.Logger) *http.Client {
func NewRestrictedClient(cfg clientConfig, lggr logger.Logger, example bool) *http.Client {
tr := newDefaultTransport()
tr.DialContext = makeRestrictedDialContext(cfg, lggr)
return &http.Client{Transport: tr}
Expand Down Expand Up @@ -60,6 +60,7 @@ type Request struct {
Request *http.Request
Config RequestConfig
Logger logger.Logger
Example bool
}

// RequestConfig holds the configurable settings for a http request
Expand Down
Loading