diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index fb81622bd6945..cc9e56053e6fe 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -108,6 +108,10 @@ jobs: go-version-file: go.mod check-latest: true - run: make lint-spell + - name: Typos check + uses: crate-ci/typos@v1.44.0 + with: + config: _typos.toml lint-go-windows: if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true' diff --git a/AGENTS.md b/AGENTS.md index 402a9d6945e75..ecd1af6fa34a9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,3 +8,4 @@ - Before committing any files, remove all trailing whitespace from source code lines - Never force-push to pull request branches - Always start issue and pull request comments with an authorship attribution +- Typos check: run `make lint-typos` when changing prose. For words that cannot be fixed (e.g. API stability), add `# typos:disable` or `// typos:disable` on that line, or allow-list the word in `_typos.toml` with a comment explaining why diff --git a/Makefile b/Makefile index 280aa853b8e06..3f933c628d8eb 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,7 @@ WEB_DIRS := web_src/js web_src/css ESLINT_FILES := web_src/js tools *.ts tests/e2e STYLELINT_FILES := web_src/css web_src/js/components/*.vue -SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) templates options/locale/locale_en-US.json .github $(filter-out CHANGELOG.md, $(wildcard *.go *.md *.yml *.yaml *.toml)) +SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) templates options/locale/locale_en-US.json .github $(filter-out CHANGELOG.md _typos.toml, $(wildcard *.go *.md *.yml *.yaml *.toml)) EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.json GO_SOURCES := $(wildcard *.go) @@ -273,10 +273,10 @@ checks-frontend: lockfile-check svg-check ## check frontend files checks-backend: tidy-check swagger-check fmt-check swagger-validate security-check ## check backend files .PHONY: lint -lint: lint-frontend lint-backend lint-spell ## lint everything +lint: lint-frontend lint-backend lint-spell lint-typos ## lint everything .PHONY: lint-fix -lint-fix: lint-frontend-fix lint-backend-fix lint-spell-fix ## lint everything and fix issues +lint-fix: lint-frontend-fix lint-backend-fix lint-spell-fix ## lint everything and fix issues (typos: run lint-typos and fix manually or add to _typos.toml) .PHONY: lint-frontend lint-frontend: lint-js lint-css ## lint frontend files @@ -328,6 +328,11 @@ lint-spell: ## lint spelling lint-spell-fix: ## lint spelling and fix issues @git ls-files $(SPELLCHECK_FILES) | xargs go run $(MISSPELL_PACKAGE) -dict assets/misspellings.csv -w +.PHONY: lint-typos +lint-typos: ## lint typos (crate-ci/typos); use "# typos:disable" in source for unfixable words + @command -v typos >/dev/null 2>&1 || { echo "typos not installed (see https://github.com/crate-ci/typos#installation), skipping"; exit 0; } + typos + .PHONY: lint-go lint-go: ## lint go files $(GO) run $(GOLANGCI_LINT_PACKAGE) run diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000000000..58ee0a7a94cf2 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,158 @@ +# Typos (crate-ci/typos) configuration. +# Words we cannot fix (e.g. API stability, external names) must be allow-listed below +# with a comment explaining why. Alternatively add "# typos:disable" or "// typos:disable" +# on the same line in source to disable the check for that line only. + +[files] +# Exclude paths that are not spell-checked (match SPELLCHECK_FILES and .gitignore) +extend-exclude = [ + "CHANGELOG*.md", + "pnpm-lock.yaml", + "go.sum", + "uv.lock", + "*.min.js", + "*.min.css", + "public/assets", + "modules/migration/bindata.*", + "modules/options/bindata.*", + "modules/public/bindata.*", + "modules/templates/bindata.*", + ".make_evidence", + "options/gitignore/Typo3", + "options/locale", + "assets/misspellings.csv", + "tests/*.ini.tmpl", + "tests/*.ini", + "routers/private/tests/repos/repo1_hook_verification_dummy_gpg_key.txt", + "routers/private/tests/repos/repo1_hook_verification", + "SECURITY.md", + "options/label", + "contrib/init/sunos", + "tools/generate-svg-vscode-extensions.json", + "web_src/fomantic", +] + +[default] +# Ignore lines that contain a disable comment (use when a typo cannot be fixed) +extend-ignore-re = [ + "(?m)^.*#\\s*typos:disable.*$", + "(?m)^.*//\\s*typos:disable.*$", + "(?m)^.*.*$", +] + +[default.extend-words] +# Project name; cannot change +Gitea = "Gitea" +gitea = "gitea" +# TypoScript is a CMS project name, not a typo of TypeScript +TypoScript = "TypoScript" +# Meilisearch ranking rule name +typo = "typo" +# TYPO3 CMS project name +TYPO3 = "TYPO3" +Typo3 = "Typo3" +# SMTP HELO command (RFC 5321); protocol term +helo = "helo" +Helo = "Helo" +HELO = "HELO" +# File extension / format name (e.g. Clojure edn, Makefile .mak) +edn = "edn" +mak = "mak" +cpy = "cpy" +odf = "odf" +# SunOS SMF framework property name +startd = "startd" +# TLS cipher name (3DES EDE); crypto standard +ede = "ede" +# Local variable name in bleve query; changing would alter behavior +tru = "tru" +# Abbreviation for TABLE in CLI usage text +TABL = "TABL" +# Both spellings exist; keep for API stability +Unparseable = "Unparseable" +unparseable = "unparseable" +# i18n key used in all locale files; cannot change key +enterred = "enterred" +# Substring in base64 or test data (false positive) +Ot = "Ot" +nd = "nd" +Nd = "Nd" +ND = "ND" +iy = "iy" +Iy = "Iy" +ba = "ba" +BA = "BA" +Pn = "Pn" +Iz = "Iz" +ue = "ue" +Ue = "Ue" +Mis = "Mis" +Ser = "Ser" +Yto = "Yto" +fo = "fo" +ist = "ist" +Ein = "Ein" +noo = "noo" +oder = "oder" +ono = "ono" +ags = "ags" +alle = "alle" +ALLWAYS = "ALLWAYS" +caf = "caf" +claus = "claus" +Claus = "Claus" +rcall = "rcall" +# util.Iif ternary helper and TestTemplateIif; public API +Iif = "Iif" +# JSON tag "commiter" in structs/repo_wiki.go and swagger; API compatibility +commiter = "commiter" +# Variable from m.GetFrom() in mailer; API +froms = "froms" +# Variable name in jobparser model (plural of data) +datas = "datas" +# Patch line in diff tests ("+--some coment 2"); test fixture +coment = "coment" +# Migration comment; leave as-is to avoid touching migration +goint = "goint" +# File extension / icon name in material-icon-rules.json +stap = "stap" +styl = "styl" +tese = "tese" +# Test filename "shouldbe.vendor" in git attribute tests +shouldbe = "shouldbe" +# Variable name in repo/issue.go labels split +splitted = "splitted" +# Template comment "indivdual user"; leave to avoid template churn +indivdual = "indivdual" +# Module name and API (interpeter.go, NewInterpeter); public API +interpeter = "interpeter" +Interpeter = "Interpeter" +# Old package_property name in migration (rpm.metdata → rpm.metadata) +metdata = "metdata" +# block.PrecendingCharacter() from markup library; external API +Precending = "Precending" +# Migration function RemoveLabelUneededCols; cannot rename +Uneeded = "Uneeded" +# Emoji shortcode "womens" (women's room) in emoji_data.go +womens = "womens" +# ARIA attribute aria-activedescendant; HTML standard +actived = "actived" +Actived = "Actived" +# Part of determineSHAforPR; public API +Afor = "Afor" +# "plastic.branchexplorer" in fileicon rules; external tool name +branche = "branche" +# Abbreviation or identifier; keep for compatibility +Colum = "Colum" +# Credentials-related identifier; keep for compatibility +Credental = "Credental" +# Identifier (e.g. global); keep for compatibility +gloabl = "gloabl" + +[default.extend-identifiers] +# util.Iif is ternary helper; cannot change: public API +Iif = "Iif" +iif = "iif" +# determineSHAforPR function name; cannot change: public API +SHAforPR = "SHAforPR" +Afor = "Afor" diff --git a/modules/actions/github.go b/modules/actions/github.go index 68116ec83a539..8a427625923c0 100644 --- a/modules/actions/github.go +++ b/modules/actions/github.go @@ -26,8 +26,8 @@ const ( ) // IsDefaultBranchWorkflow returns true if the event only triggers workflows on the default branch -func IsDefaultBranchWorkflow(triggedEvent webhook_module.HookEventType) bool { - switch triggedEvent { +func IsDefaultBranchWorkflow(triggeredEvent webhook_module.HookEventType) bool { + switch triggeredEvent { case webhook_module.HookEventDelete: // GitHub "delete" event // https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#delete @@ -65,17 +65,17 @@ func IsDefaultBranchWorkflow(triggedEvent webhook_module.HookEventType) bool { } // canGithubEventMatch check if the input Github event can match any Gitea event. -func canGithubEventMatch(eventName string, triggedEvent webhook_module.HookEventType) bool { +func canGithubEventMatch(eventName string, triggeredEvent webhook_module.HookEventType) bool { switch eventName { case GithubEventRegistryPackage: - return triggedEvent == webhook_module.HookEventPackage + return triggeredEvent == webhook_module.HookEventPackage // See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#gollum case GithubEventGollum: - return triggedEvent == webhook_module.HookEventWiki + return triggeredEvent == webhook_module.HookEventWiki case GithubEventIssues: - switch triggedEvent { + switch triggeredEvent { case webhook_module.HookEventIssues, webhook_module.HookEventIssueAssign, webhook_module.HookEventIssueLabel, @@ -87,7 +87,7 @@ func canGithubEventMatch(eventName string, triggedEvent webhook_module.HookEvent } case GithubEventPullRequest, GithubEventPullRequestTarget: - switch triggedEvent { + switch triggeredEvent { case webhook_module.HookEventPullRequest, webhook_module.HookEventPullRequestSync, webhook_module.HookEventPullRequestAssign, @@ -101,7 +101,7 @@ func canGithubEventMatch(eventName string, triggedEvent webhook_module.HookEvent } case GithubEventPullRequestReview: - switch triggedEvent { + switch triggeredEvent { case webhook_module.HookEventPullRequestReviewApproved, webhook_module.HookEventPullRequestReviewComment, webhook_module.HookEventPullRequestReviewRejected: @@ -112,14 +112,14 @@ func canGithubEventMatch(eventName string, triggedEvent webhook_module.HookEvent } case GithubEventSchedule: - return triggedEvent == webhook_module.HookEventSchedule + return triggeredEvent == webhook_module.HookEventSchedule case GithubEventIssueComment: // https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_comment-use-issue_comment - return triggedEvent == webhook_module.HookEventIssueComment || - triggedEvent == webhook_module.HookEventPullRequestComment + return triggeredEvent == webhook_module.HookEventIssueComment || + triggeredEvent == webhook_module.HookEventPullRequestComment default: - return eventName == string(triggedEvent) + return eventName == string(triggeredEvent) } } diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index 4ac06def4d5a1..5754e13ec4c88 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -110,7 +110,7 @@ func GetEventsFromContent(content []byte) ([]*jobparser.Event, error) { func DetectWorkflows( gitRepo *git.Repository, commit *git.Commit, - triggedEvent webhook_module.HookEventType, + triggeredEvent webhook_module.HookEventType, payload api.Payloader, detectSchedule bool, ) ([]*DetectedWorkflow, []*DetectedWorkflow, error) { @@ -134,7 +134,7 @@ func DetectWorkflows( continue } for _, evt := range events { - log.Trace("detect workflow %q for event %#v matching %q", entry.Name(), evt, triggedEvent) + log.Trace("detect workflow %q for event %#v matching %q", entry.Name(), evt, triggeredEvent) if evt.IsSchedule() { if detectSchedule { dwf := &DetectedWorkflow{ @@ -144,7 +144,7 @@ func DetectWorkflows( } schedules = append(schedules, dwf) } - } else if detectMatched(gitRepo, commit, triggedEvent, payload, evt) { + } else if detectMatched(gitRepo, commit, triggeredEvent, payload, evt) { dwf := &DetectedWorkflow{ EntryName: entry.Name(), TriggerEvent: evt, @@ -193,12 +193,12 @@ func DetectScheduledWorkflows(gitRepo *git.Repository, commit *git.Commit) ([]*D return wfs, nil } -func detectMatched(gitRepo *git.Repository, commit *git.Commit, triggedEvent webhook_module.HookEventType, payload api.Payloader, evt *jobparser.Event) bool { - if !canGithubEventMatch(evt.Name, triggedEvent) { +func detectMatched(gitRepo *git.Repository, commit *git.Commit, triggeredEvent webhook_module.HookEventType, payload api.Payloader, evt *jobparser.Event) bool { + if !canGithubEventMatch(evt.Name, triggeredEvent) { return false } - switch triggedEvent { + switch triggeredEvent { case // events with no activity types webhook_module.HookEventCreate, webhook_module.HookEventDelete, @@ -206,7 +206,7 @@ func detectMatched(gitRepo *git.Repository, commit *git.Commit, triggedEvent web webhook_module.HookEventWiki, webhook_module.HookEventSchedule: if len(evt.Acts()) != 0 { - log.Warn("Ignore unsupported %s event arguments %v", triggedEvent, evt.Acts()) + log.Warn("Ignore unsupported %s event arguments %v", triggeredEvent, evt.Acts()) } // no special filter parameters for these events, just return true if name matched return true @@ -260,7 +260,7 @@ func detectMatched(gitRepo *git.Repository, commit *git.Commit, triggedEvent web return matchWorkflowRunEvent(payload.(*api.WorkflowRunPayload), evt) default: - log.Warn("unsupported event %q", triggedEvent) + log.Warn("unsupported event %q", triggeredEvent) return false } } diff --git a/modules/actions/workflows_test.go b/modules/actions/workflows_test.go index ea027366f7eb5..a1734e074c4c0 100644 --- a/modules/actions/workflows_test.go +++ b/modules/actions/workflows_test.go @@ -86,58 +86,58 @@ func TestIsWorkflow(t *testing.T) { func TestDetectMatched(t *testing.T) { testCases := []struct { - desc string - commit *git.Commit - triggedEvent webhook_module.HookEventType - payload api.Payloader - yamlOn string - expected bool + desc string + commit *git.Commit + triggeredEvent webhook_module.HookEventType + payload api.Payloader + yamlOn string + expected bool }{ { - desc: "HookEventCreate(create) matches GithubEventCreate(create)", - triggedEvent: webhook_module.HookEventCreate, - payload: nil, - yamlOn: "on: create", - expected: true, + desc: "HookEventCreate(create) matches GithubEventCreate(create)", + triggeredEvent: webhook_module.HookEventCreate, + payload: nil, + yamlOn: "on: create", + expected: true, }, { - desc: "HookEventIssues(issues) `opened` action matches GithubEventIssues(issues)", - triggedEvent: webhook_module.HookEventIssues, - payload: &api.IssuePayload{Action: api.HookIssueOpened}, - yamlOn: "on: issues", - expected: true, + desc: "HookEventIssues(issues) `opened` action matches GithubEventIssues(issues)", + triggeredEvent: webhook_module.HookEventIssues, + payload: &api.IssuePayload{Action: api.HookIssueOpened}, + yamlOn: "on: issues", + expected: true, }, { - desc: "HookEventIssues(issues) `milestoned` action matches GithubEventIssues(issues)", - triggedEvent: webhook_module.HookEventIssues, - payload: &api.IssuePayload{Action: api.HookIssueMilestoned}, - yamlOn: "on: issues", - expected: true, + desc: "HookEventIssues(issues) `milestoned` action matches GithubEventIssues(issues)", + triggeredEvent: webhook_module.HookEventIssues, + payload: &api.IssuePayload{Action: api.HookIssueMilestoned}, + yamlOn: "on: issues", + expected: true, }, { - desc: "HookEventPullRequestSync(pull_request_sync) matches GithubEventPullRequest(pull_request)", - triggedEvent: webhook_module.HookEventPullRequestSync, - payload: &api.PullRequestPayload{Action: api.HookIssueSynchronized}, - yamlOn: "on: pull_request", - expected: true, + desc: "HookEventPullRequestSync(pull_request_sync) matches GithubEventPullRequest(pull_request)", + triggeredEvent: webhook_module.HookEventPullRequestSync, + payload: &api.PullRequestPayload{Action: api.HookIssueSynchronized}, + yamlOn: "on: pull_request", + expected: true, }, { - desc: "HookEventPullRequest(pull_request) `label_updated` action doesn't match GithubEventPullRequest(pull_request) with no activity type", - triggedEvent: webhook_module.HookEventPullRequest, - payload: &api.PullRequestPayload{Action: api.HookIssueLabelUpdated}, - yamlOn: "on: pull_request", - expected: false, + desc: "HookEventPullRequest(pull_request) `label_updated` action doesn't match GithubEventPullRequest(pull_request) with no activity type", + triggeredEvent: webhook_module.HookEventPullRequest, + payload: &api.PullRequestPayload{Action: api.HookIssueLabelUpdated}, + yamlOn: "on: pull_request", + expected: false, }, { - desc: "HookEventPullRequest(pull_request) `closed` action doesn't match GithubEventPullRequest(pull_request) with no activity type", - triggedEvent: webhook_module.HookEventPullRequest, - payload: &api.PullRequestPayload{Action: api.HookIssueClosed}, - yamlOn: "on: pull_request", - expected: false, + desc: "HookEventPullRequest(pull_request) `closed` action doesn't match GithubEventPullRequest(pull_request) with no activity type", + triggeredEvent: webhook_module.HookEventPullRequest, + payload: &api.PullRequestPayload{Action: api.HookIssueClosed}, + yamlOn: "on: pull_request", + expected: false, }, { - desc: "HookEventPullRequest(pull_request) `closed` action doesn't match GithubEventPullRequest(pull_request) with branches", - triggedEvent: webhook_module.HookEventPullRequest, + desc: "HookEventPullRequest(pull_request) `closed` action doesn't match GithubEventPullRequest(pull_request) with branches", + triggeredEvent: webhook_module.HookEventPullRequest, payload: &api.PullRequestPayload{ Action: api.HookIssueClosed, PullRequest: &api.PullRequest{ @@ -148,57 +148,57 @@ func TestDetectMatched(t *testing.T) { expected: false, }, { - desc: "HookEventPullRequest(pull_request) `label_updated` action matches GithubEventPullRequest(pull_request) with `label` activity type", - triggedEvent: webhook_module.HookEventPullRequest, - payload: &api.PullRequestPayload{Action: api.HookIssueLabelUpdated}, - yamlOn: "on:\n pull_request:\n types: [labeled]", - expected: true, + desc: "HookEventPullRequest(pull_request) `label_updated` action matches GithubEventPullRequest(pull_request) with `label` activity type", + triggeredEvent: webhook_module.HookEventPullRequest, + payload: &api.PullRequestPayload{Action: api.HookIssueLabelUpdated}, + yamlOn: "on:\n pull_request:\n types: [labeled]", + expected: true, }, { - desc: "HookEventPullRequestReviewComment(pull_request_review_comment) matches GithubEventPullRequestReviewComment(pull_request_review_comment)", - triggedEvent: webhook_module.HookEventPullRequestReviewComment, - payload: &api.PullRequestPayload{Action: api.HookIssueReviewed}, - yamlOn: "on:\n pull_request_review_comment:\n types: [created]", - expected: true, + desc: "HookEventPullRequestReviewComment(pull_request_review_comment) matches GithubEventPullRequestReviewComment(pull_request_review_comment)", + triggeredEvent: webhook_module.HookEventPullRequestReviewComment, + payload: &api.PullRequestPayload{Action: api.HookIssueReviewed}, + yamlOn: "on:\n pull_request_review_comment:\n types: [created]", + expected: true, }, { - desc: "HookEventPullRequestReviewRejected(pull_request_review_rejected) doesn't match GithubEventPullRequestReview(pull_request_review) with `dismissed` activity type (we don't support `dismissed` at present)", - triggedEvent: webhook_module.HookEventPullRequestReviewRejected, - payload: &api.PullRequestPayload{Action: api.HookIssueReviewed}, - yamlOn: "on:\n pull_request_review:\n types: [dismissed]", - expected: false, + desc: "HookEventPullRequestReviewRejected(pull_request_review_rejected) doesn't match GithubEventPullRequestReview(pull_request_review) with `dismissed` activity type (we don't support `dismissed` at present)", + triggeredEvent: webhook_module.HookEventPullRequestReviewRejected, + payload: &api.PullRequestPayload{Action: api.HookIssueReviewed}, + yamlOn: "on:\n pull_request_review:\n types: [dismissed]", + expected: false, }, { - desc: "HookEventRelease(release) `published` action matches GithubEventRelease(release) with `published` activity type", - triggedEvent: webhook_module.HookEventRelease, - payload: &api.ReleasePayload{Action: api.HookReleasePublished}, - yamlOn: "on:\n release:\n types: [published]", - expected: true, + desc: "HookEventRelease(release) `published` action matches GithubEventRelease(release) with `published` activity type", + triggeredEvent: webhook_module.HookEventRelease, + payload: &api.ReleasePayload{Action: api.HookReleasePublished}, + yamlOn: "on:\n release:\n types: [published]", + expected: true, }, { - desc: "HookEventPackage(package) `created` action doesn't match GithubEventRegistryPackage(registry_package) with `updated` activity type", - triggedEvent: webhook_module.HookEventPackage, - payload: &api.PackagePayload{Action: api.HookPackageCreated}, - yamlOn: "on:\n registry_package:\n types: [updated]", - expected: false, + desc: "HookEventPackage(package) `created` action doesn't match GithubEventRegistryPackage(registry_package) with `updated` activity type", + triggeredEvent: webhook_module.HookEventPackage, + payload: &api.PackagePayload{Action: api.HookPackageCreated}, + yamlOn: "on:\n registry_package:\n types: [updated]", + expected: false, }, { - desc: "HookEventWiki(wiki) matches GithubEventGollum(gollum)", - triggedEvent: webhook_module.HookEventWiki, - payload: nil, - yamlOn: "on: gollum", - expected: true, + desc: "HookEventWiki(wiki) matches GithubEventGollum(gollum)", + triggeredEvent: webhook_module.HookEventWiki, + payload: nil, + yamlOn: "on: gollum", + expected: true, }, { - desc: "HookEventSchedule(schedule) matches GithubEventSchedule(schedule)", - triggedEvent: webhook_module.HookEventSchedule, - payload: nil, - yamlOn: "on: schedule", - expected: true, + desc: "HookEventSchedule(schedule) matches GithubEventSchedule(schedule)", + triggeredEvent: webhook_module.HookEventSchedule, + payload: nil, + yamlOn: "on: schedule", + expected: true, }, { - desc: "push to tag matches workflow with paths condition (should skip paths check)", - triggedEvent: webhook_module.HookEventPush, + desc: "push to tag matches workflow with paths condition (should skip paths check)", + triggeredEvent: webhook_module.HookEventPush, payload: &api.PushPayload{ Ref: "refs/tags/v1.0.0", Before: "0000000", @@ -221,7 +221,7 @@ func TestDetectMatched(t *testing.T) { evts, err := GetEventsFromContent([]byte(tc.yamlOn)) assert.NoError(t, err) assert.Len(t, evts, 1) - assert.Equal(t, tc.expected, detectMatched(nil, tc.commit, tc.triggedEvent, tc.payload, evts[0])) + assert.Equal(t, tc.expected, detectMatched(nil, tc.commit, tc.triggeredEvent, tc.payload, evts[0])) }) } } diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index 3bcea83f43829..55e60708f375c 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -55,7 +55,7 @@ func TestRepoCommits(t *testing.T) { assert.Equal(t, "/user2", authorHref) }) - t.Run("CommitListNonExistingCommiter", func(t *testing.T) { + t.Run("CommitListNonExistingCommitter", func(t *testing.T) { // check the commit list for a repository with no gitea user // * commit 985f0301dba5e7b34be866819cd15ad3d8f508ee (branch2) // * Author: 6543 <6543@obermui.de> @@ -69,7 +69,7 @@ func TestRepoCommits(t *testing.T) { assert.Equal(t, "6543", strings.TrimSpace(authorElem.Text())) }) - t.Run("LastCommitNonExistingCommiter", func(t *testing.T) { + t.Run("LastCommitNonExistingCommitter", func(t *testing.T) { req := NewRequest(t, "GET", "/user2/repo1/src/branch/branch2") resp := session.MakeRequest(t, req, http.StatusOK) doc := NewHTMLParser(t, resp.Body)