Skip to content

When the context of a request is nil, return InvalidArgument/400 #4585

When the context of a request is nil, return InvalidArgument/400

When the context of a request is nil, return InvalidArgument/400 #4585

Workflow file for this run

name: Code Generation
on:
push:
branches:
- main
- release-*
paths-ignore:
- "**.md"
- "docs/**"
- "**.txt"
- "images/**"
- "LICENSE"
pull_request:
branches:
- main
paths-ignore:
- "**.md"
- "docs/**"
- "**.txt"
- "images/**"
- "LICENSE"
jobs:
lint-protos:
runs-on: ubuntu-latest
steps:
# Run `git checkout`
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
# Install the `buf` CLI
- uses: bufbuild/buf-setup-action@88db93f5d74ffa329bb43e42aa95cd822697d214 # v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Lint your Protobuf sources
- uses: bufbuild/buf-lint-action@044d13acb1f155179c606aaa2e53aea304d22058 # v1
proto-breaking-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: bufbuild/buf-setup-action@88db93f5d74ffa329bb43e42aa95cd822697d214 # v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: bufbuild/buf-breaking-action@a074e988ee34efcd4927079e79c611f428354c01 # v1
with:
against: "https://github.com/stacklok/minder.git#branch=main"
sqlc-generation:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version-file: "go.mod"
- name: Make bootstrap
run: |
make bootstrap
- name: Generate Go code from SQL and check for syntax errors
shell: bash
run: |
make sqlc
- name: Check for uncommitted SQLC changes
run: |
git diff --exit-code || (echo "Error: Uncommitted changes detected after running 'sqlc generate'. Please commit the changes and try again." && exit 1)