fix: correct syntax errors in auth_test.go #2760
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| --- | |
| name: Changelog | |
| on: | |
| pull_request: | |
| types: [opened, reopened, labeled, unlabeled, synchronize] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ format('{0}-{1}-{2}-{3}-{4}', github.workflow, github.event_name, github.ref, github.base_ref || null, github.head_ref || null) }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| changelog-existence: | |
| name: Check Changelog | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') && github.actor != 'dependabot[bot]' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # Required for checkout | |
| pull-requests: read # Only need to read PR info, not write | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Output GitHub Variables | |
| run: env | grep GITHUB | |
| - name: Check if changelog file was added | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: changelog_check | |
| with: | |
| filters: | | |
| exists: | |
| - added|modified: '.changes/unreleased/**.yaml' | |
| - name: Setup Go | |
| if: steps.changelog_check.outputs.exists == 'true' | |
| uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install Changie | |
| if: steps.changelog_check.outputs.exists == 'true' | |
| run: | | |
| go install github.com/miniscruff/changie@latest | |
| go mod download | |
| - name: Pass if changelog entry exists | |
| if: steps.changelog_check.outputs.exists == 'true' | |
| run: | | |
| echo "Changelog entry exists." | |
| exit 0 | |
| - name: Fail if changelog entry is missing and required | |
| if: steps.changelog_check.outputs.exists == 'false' | |
| run: | | |
| echo "🛑 Changelog entry required to merge." | |
| exit 1 | |
| changelog-skip: | |
| name: Check Changelog | |
| if: ${{ contains(github.event.pull_request.labels.*.name, 'skip-changelog') || github.actor == 'dependabot[bot]' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # Required for checkout | |
| pull-requests: write # Required for comment deletion | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: audit | |
| - name: Find comment | |
| if: github.actor != 'dependabot[bot]' | |
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: "<!-- changelog -->" | |
| - name: Delete comment | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| if: github.actor != 'dependabot[bot]' && steps.fc.outputs.comment-id != '' | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| ...context.repo, | |
| comment_id: ${{ steps.fc.outputs.comment-id }}, | |
| }); | |
| - name: Pass (skip) | |
| run: exit 0 |