Skip to content

feat: Add rate limit handling for GitHub client #7147

feat: Add rate limit handling for GitHub client

feat: Add rate limit handling for GitHub client #7147

Workflow file for this run

name: linter
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- "main"
- "release-**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: Allow write access to checks to allow the action to annotate code in the PR.
checks: write
jobs:
changes:
outputs:
should-run-linting: ${{ steps.changes.outputs.go == 'true' }}
if: github.event.pull_request.draft == false
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
filters: |
go:
- '**.go'
- 'go.*'
- '.github/workflows/lint.yml'
- '.golangci.yml'
golangci-lint:
needs: [changes]
if: github.event.pull_request.draft == false && needs.changes.outputs.should-run-linting == 'true'
name: Linting
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# need to setup go toolchain explicitly
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6
with:
# renovate: datasource=github-releases depName=golangci/golangci-lint
version: v1.60.1
skip-lint:
needs: [changes]
if: needs.changes.outputs.should-run-linting == 'false'
name: Linting
runs-on: ubuntu-24.04
steps:
- run: 'echo "No build required"'