From d8f38a84e879435c71fd0a14e96be0fd18e5418c Mon Sep 17 00:00:00 2001 From: Mateusz Filipowicz Date: Fri, 7 Feb 2025 15:36:48 +0100 Subject: [PATCH] chore: applying linter fixes --- .github/.release.yml | 21 ++++++++++--------- .github/workflows/conventional-commits.yml | 8 ++++---- .github/workflows/generate.yaml | 24 +++++++++++----------- fields/version.go | 2 +- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/.release.yml b/.github/.release.yml index da1ff6f..1e57a5a 100644 --- a/.github/.release.yml +++ b/.github/.release.yml @@ -1,18 +1,19 @@ +--- changelog: exclude: labels: - - ignore-for-release - - dependencies + - "ignore-for-release" + - "dependencies" categories: - - title: Breaking Changes 🛠 + - title: "Breaking Changes 🛠" labels: - - breaking - - title: New Features 🎉 + - "breaking" + - title: "New Features 🎉" labels: - - feature - - title: Fixes 🔧 + - "feature" + - title: "Fixes 🔧" labels: - - fix - - title: Other Changes + - "fix" + - title: "Other Changes" labels: - - "*" \ No newline at end of file + - "*" diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index bc383db..f24fcdc 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -1,12 +1,12 @@ --- -name: conventional-commits +name: "conventional-commits" on: pull_request_target: types: - - opened - - edited + - "opened" + - "edited" jobs: label: - runs-on: ubuntu-latest + runs-on: "ubuntu-latest" steps: - uses: "bcoe/conventional-release-labels@v1" diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml index be8040a..0ca4163 100644 --- a/.github/workflows/generate.yaml +++ b/.github/workflows/generate.yaml @@ -1,35 +1,35 @@ --- on: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" workflow_dispatch: {} permissions: - contents: write - pull-requests: write + contents: "write" + pull-requests: "write" jobs: fields: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" steps: - - uses: 'actions/checkout@v4' + - uses: "actions/checkout@v4" - - uses: 'actions/setup-go@v5' + - uses: "actions/setup-go@v5" - name: "Generate new client structures" run: 'go generate unifi/fields.go' - - name: Read Unifi version marker - id: unifi_version + - name: "Read Unifi version marker" + id: "unifi_version" uses: 'juliangruber/read-file-action@v1' with: - path: ./unifi-version + path: "./unifi-version" trim: 'true' # TODO: Automatically merge the PR if tests pass. - - uses: 'peter-evans/create-pull-request@v7' + - uses: "peter-evans/create-pull-request@v7" with: delete-branch: true - title: 'feat: update to the controller version ${{ steps.unifi_version.outputs.content }}' - commit-message: 'feat: update to the controller version ${{ steps.unifi_version.outputs.content }}' + title: "feat: update to the controller version ${{ steps.unifi_version.outputs.content }}" + commit-message: "feat: update to the controller version ${{ steps.unifi_version.outputs.content }}" diff --git a/fields/version.go b/fields/version.go index 04aed59..85927b1 100644 --- a/fields/version.go +++ b/fields/version.go @@ -106,6 +106,6 @@ const UnifiVersion = %q } func writeVersionRepoMarkerFile(version *version.Version, outDir string) error { - versionRepoMarker := []byte(fmt.Sprintf(`%s`, version.Core())) + versionRepoMarker := []byte(version.Core().String()) return os.WriteFile(filepath.Join(outDir, ".unifi-version"), versionRepoMarker, 0o644) }