diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000000000..3ebbf5504b96e --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index c08834645cb7f..a80540a78585d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -164,7 +164,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Add dark mode to API Docs (#24971) * Display file mode for new file and file mode changes (#24966) * Make the 500 page load themes (#24953) - * Show `bot` label next to username when rendering autor link if the user is a bot (#24943) + * Show `bot` label next to username when rendering author link if the user is a bot (#24943) * Repo list improvements, fix bold helper classes (#24935) * Improve queue and logger context (#24924) * Improve RunMode / dev mode (#24886) @@ -374,7 +374,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Remove `id="comment-form"` dead code, fix tag (#23555) * Diff improvements (#23553) * Sort Python package descriptors by version to mimic PyPI format (#23550) - * Use a general approch to improve a11y for all checkboxes and dropdowns. (#23542) + * Use a general approach to improve a11y for all checkboxes and dropdowns. (#23542) * Fix long name ui issues and label ui issue (#23541) * Return `repository` in npm package metadata endpoint (#23539) * Use `project.IconName` instead of repeated unreadable `if-else` chains (#23538) @@ -477,7 +477,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Help to recover from corrupted levelqueue (#24912) * Fix 500 error when select `No assignee` filter in issue list page (#24854) * Add validations.required check to dropdown field (#24849) - * Reenable creating default webhooks. (#24626) + * Re-enable creating default webhooks. (#24626) * Fix incorrect user visibility (#24557) * Fix commits pushed with deploy keys not shown in dashboard (#24521) * Check length of `LogIndexes` in case it is outdated (#24516) @@ -560,7 +560,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Replace `drone exec` to `act_runner exec` in test README.md (#24791) * Update packages overview page (#24730) * Docs for creating a user to run Gitea on Fedora/RHEL/CentOS (#24725) - * Move actions as usage's subdirectory and update comparsion zh-cn version (#24719) + * Move actions as usage's subdirectory and update comparison zh-cn version (#24719) * Document `redis-cluster` explicitly in config (#24717) * Improve reverse-proxy document and fix nginx config bug (#24616) * Fix broken `README` link (#24546) @@ -638,7 +638,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Show visibility status of email in own profile (#23900) * Refactor authors dropdown (send get request from frontend to avoid long wait time) (#23890) * Add self to maintainers (#23644) - * Upgrade to npm lockfile v3 and explicitely set it (#23561) + * Upgrade to npm lockfile v3 and explicitly set it (#23561) * Improve indices for `action` table (#23532) * Update JS dependencies, Require Node.js 16 (#23528) * Add init file for Ubuntu (#23362) @@ -679,7 +679,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fix issues list page multiple selection update milestones (#24660) (#24663) * Fix: release page for empty or non-existing target (#24659) * Fix close org projects (#24588) (#24591) - * Refresh the refernce of the closed PR when reopening (#24231) (#24587) + * Refresh the reference of the closed PR when reopening (#24231) (#24587) * Fix the permission of team's `Actions` unit issue (#24536) (#24545) * Bump go.etcd.io/bbolt and blevesearch deps (#23062) (#24519) * Fix new wiki page mirror (#24518) @@ -901,7 +901,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fix sticky header in diff view (#23554) (#23568) * Refactor merge/update git command calls (#23366) (#23544) * Fix review comment context menu clipped bug (#23523) (#23543) - * Imrove scroll behavior to hash issuecomment(scroll position, auto expand if file is folded, and on refreshing) (#23513) (#23540) + * Improve scroll behavior to hash issuecomment(scroll position, auto expand if file is folded, and on refreshing) (#23513) (#23540) * Increase horizontal page padding (#23507) (#23537) * Use octicon-verified for gpg signatures (#23529) (#23536) * Make time tooltips interactive (#23526) (#23527) @@ -1199,7 +1199,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * ENHANCEMENTS * Hide 2FA status from other members in organization members list (#22999) (#23023) * BUGFIXES - * Add force_merge to merge request and fix checking mergable (#23010) (#23032) + * Add force_merge to merge request and fix checking mergeable (#23010) (#23032) * Use `--message=%s` for git commit message (#23028) (#23029) * Render access log template as text instead of HTML (#23013) (#23025) * Fix the Manually Merged form (#23015) (#23017) @@ -1783,7 +1783,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fix Pull Request comment filename word breaks (#19535) * Permalink files In PR diff (#19534) * PullService lock via pullID (#19520) - * Make repository file list useable on mobile (#19515) + * Make repository file list usable on mobile (#19515) * more context for models (#19511) * Refactor readme file renderer (#19502) * By default force vertical tabs on mobile (#19486) @@ -1820,8 +1820,8 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Feeds: render markdown to html (#19058) * Allow users to self-request a PR review (#19030) * Allow render HTML with css/js external links (#19017) - * Fix script compatiable with OpenWrt (#19000) - * Support ignore all santize for external renderer (#18984) + * Fix script compatible with OpenWrt (#19000) + * Support ignore all sanitize for external renderer (#18984) * Add note to GPG key response if user has no keys (#18961) * Improve Stopwatch behavior (#18930) * Improve mirror iterator (#18928) @@ -1962,7 +1962,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Add warning to set SENDMAIL_ARGS to -- (#19102) * Update nginx reverse proxy docs (#18922) * Add example to render html files (#18736) - * Make SSH passtrough documentation better (#18687) + * Make SSH passthrough documentation better (#18687) * Changelog 1.16.0 & 1.15.11 (#18468 & #18455) (#18470) * Update the SSH passthrough documentation (#18366) * Add `contrib/upgrade.sh` (#18286) @@ -2151,7 +2151,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Update go-org to v1.6.1 (#18932) (#18933) * Fix `` html in translation (#18929) (#18931) * Fix page and missing return on unadopted repos API (#18848) (#18927) - * Allow adminstrator teams members to see other teams (#18918) (#18919) + * Allow administrator teams members to see other teams (#18918) (#18919) * Don't treat BOM escape sequence as hidden character. (#18909) (#18910) * Correctly link URLs to users/repos with dashes, dots or underscores (… (#18908) * Fix redirect when using lowercase repo name (#18775) (#18902) @@ -2290,7 +2290,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * API * Add MirrorUpdated field to Repository API type (#18267) * Adjust Fork API to allow setting a custom repository name (#18066) - * Add API to manage repo tranfers (#17963) + * Add API to manage repo transfers (#17963) * Add API to get file commit history (#17652) * Add API to get issue/pull comments and events (timeline) (#17403) * Add API to get/edit wiki (#17278) @@ -2341,7 +2341,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fix navbar on project view (#17749) * More pleasantly handle broken or missing git repositories (#17747) * Use `*PushUpdateOptions` as receiver (#17724) - * Remove unused `user` paramater (#17723) + * Remove unused `user` parameter (#17723) * Better builtin avatar generator (#17707) * Cleanup and use global style on popups (#17674) * Move user/org deletion to services (#17673) @@ -2499,7 +2499,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fixed issue merged/closed wording (#17973) * Return nicer error for ForcePrivate (#17971) * Fix overflow in commit graph (#17947) - * Prevent services/mailer/mailer_test.go tests from deleteing data directory (#17941) + * Prevent services/mailer/mailer_test.go tests from deleting data directory (#17941) * Use disable_form_autofill on Codebase and Gitbucket (#17936) * Fix a panic in NotifyCreateIssueComment (caused by string truncation) (#17928) * Fix markdown URL parsing (#17924) @@ -2538,7 +2538,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fixed emoji alias not parsed in links (#16221) * Calculate label URL on API (#16186) * TRANSLATION - * Fix mispelling of starred as stared (#17465) + * Fix misspelling of starred as stared (#17465) * Re-separate the color translation strings (#17390) * Enable Malayalam, Greek, Persian, Hungarian & Indonesian by default (#16998) * BUILD @@ -2730,7 +2730,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Correctly return the number of Repositories for Organizations (#16807) (#16911) * Test if LFS object is accessible (#16865) (#16904) * Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900) - * Fix dump and restore respository (#16698) (#16898) + * Fix dump and restore repository (#16698) (#16898) * Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895) * Fix wiki raw commit diff/patch view (#16891) (#16892) * Ensure wiki repos are all closed (#16886) (#16888) @@ -3481,7 +3481,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fix bug on avatar middleware (#15124) (#15125) * Fix another clusterfuzz identified issue (#15096) (#15114) * API - * Fix nil exeption for get pull reviews API #15104 (#15106) + * Fix nil exception for get pull reviews API #15104 (#15106) * BUGFIXES * Fix markdown rendering in milestone content (#15056) (#15092) @@ -3513,9 +3513,9 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * BUGFIXES * Fix race in LFS ContentStore.Put(...) (#14895) (#14913) * Fix a couple of issues with a feeds (#14897) (#14903) - * When transfering repository and database transaction failed, rollback the renames (#14864) (#14902) + * When transferring repository and database transaction failed, rollback the renames (#14864) (#14902) * Fix race in local storage (#14888) (#14901) - * Fix 500 on pull view page if user is not loged in (#14885) (#14886) + * Fix 500 on pull view page if user is not logged in (#14885) (#14886) * DOCS * Fix how lfs data path is set (#14855) (#14884) @@ -3811,7 +3811,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Set language via AJAX (#12785) * Show git-pull-request icon for closed pull request (#12742) * Migrate version parsing library to hashicorp/go-version (#12719) - * Only use async pre-empt hack if go < 1.15 (#12718) + * Only use async preempt hack if go < 1.15 (#12718) * Inform user about meaning of an hourglass on reviews (#12713) * Add a migrate service type switch page (#12697) * Migrations: Gitlab Add Reactions Support for Issues & MergeRequests (#12695) @@ -3830,7 +3830,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Set z-index for sticky diff box lower (#12537) * Report error if API merge is not allowed (#12528) * LFS support to be stored on minio (#12518) - * Show 2FA info on Admin Pannel: Users List (#12515) + * Show 2FA info on Admin Panel: Users List (#12515) * Milestone Issue/Pull List: Add octicons type (#12499) * Make dashboard newsfeed list length a configurable item (#12469) * Add placeholder text for send testing email button in admin/config (#12452) @@ -3844,7 +3844,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Render the git graph on the server (#12333) * Fix clone panel in wiki position not always align right (#12326) * Rework 'make generate-images' (#12316) - * Refactor webhook payload convertion (#12310) + * Refactor webhook payload conversion (#12310) * Move jquery-minicolors to npm/webpack (#12305) * Support use nvarchar for all varchar columns when using mssql (#12269) * Update Octicons to v10 (#12240) @@ -3920,7 +3920,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Add debug option to hooks (#11624) * Log slow tests (#11487) * TRANSLATION - * Translate two small lables on commit statuse list (#12821) + * Translate two small labels on commit statuse list (#12821) * Make issues.force_push_codes message shorter (#11575) * BUILD * Bump min required golang to 1.13 (#12717) @@ -4010,7 +4010,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). ## [1.12.2](https://github.com/go-gitea/gitea/releases/tag/v1.12.2) - 2020-07-11 * BUGFIXES - * When deleting repository decrese user repository count in cache (#11954) (#12188) + * When deleting repository decrease user repository count in cache (#11954) (#12188) * Return full commit message instead of summary in commits API (#12186) (#12187) * Properly set HEAD when a repo is created with a default branch that is not named 'master' (#12135) (#12182) * Ensure GPG Subkeys are verified (#12155) (#12168) @@ -4299,7 +4299,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Add restricted user filter to LDAP authentication (#10600) * Add Yandex OAuth2 provider (#8335) (#10564) * Make avatar lookup occur at image request (#10540) - * Prevent accidential selection of language stats bar (#10537) + * Prevent accidental selection of language stats bar (#10537) * Add fluid-icon (#10491) * Inform participants on UI too (#10473) * Build with go 1.14 (and raise minimum go version to 1.12) (#10467) @@ -4429,7 +4429,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * api.Context.NotFound(...) should tolerate nil (#11288) (#11306) * Show pull request selection even when unrelated branches (#11239) (#11283) * Repo: milestone: make /milestone/:id endpoint accessible (#11264) (#11282) - * Fix GetContents(): Dont't ignore Executables (#11192) (#11209) + * Fix GetContents(): Don't ignore Executables (#11192) (#11209) * Fix submodule paths when AppSubUrl is not root (#11098) (#11176) * Prevent clones and pushes to disabled wiki (#11131) (#11134) * Remove errant third closing curly-bracket from account.tmpl and send account ID in account.tmpl (#11130) @@ -4691,7 +4691,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Don't link wiki revision to commit (#9244) * Change review content column to type text in db (#9229) * Fixed topic regex pattern and added search by topic links after save (#9219) - * Add language to user API responce (#9215) + * Add language to user API response (#9215) * Correct tooltip message blocked by dependencies (#9211) * Add SimpleMDE and Fix Image Paste for Issue/Comment Editor (#9197) * Fix panic when diff (#9187) @@ -4781,7 +4781,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Refactor webhooks to reduce code duplication (#9422) * update couchbase deps for new license (#9419) * Add .ignore file for search tools (#9417) - * Remove unsued struct (#9405) + * Remove unused struct (#9405) * Hide not allowed Reactions (#9387) * Remove text from action-only webhooks (#9377) * Move PushToBaseRepo from models to services/pull (#9352) @@ -4798,7 +4798,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Remove unused comment actions (#9222) * Fixed errors logging in dump.go (#9218) * Expose release counter to repo API response (#9214) - * Make consistent links to repository in the Slack/Mattermost notificiations (#9205) + * Make consistent links to repository in the Slack/Mattermost notifications (#9205) * Expose pull request counter to repo API response (#9202) * Extend TrackedTimes API (#9200) * Extend StopWatch API (#9196) @@ -4866,7 +4866,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Add single sign-on support via SSPI on Windows (#8463) * Move change issue title from models to issue service package (#8456) * Add included tag on branch view (#8449) - * Make static resouces web browser cache time customized on app.ini (#8442) + * Make static resources web browser cache time customized on app.ini (#8442) * Enable Uploading/Removing Attachments When Editing an Issue/Comment (#8426) * Add pagination to commit graph page (#8360) * Use templates for issue e-mail subject and body (#8329) @@ -5134,7 +5134,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Check for either escaped or unescaped wiki filenames (#8408) * Allow users with explicit read access to give approvals (#8382) * Fix editor commit to new branch if PR disabled (#8375) - * readd .markdown class to all markup renderers (#8357) + * re-add .markdown class to all markup renderers (#8357) * Upgrade xorm to v0.7.9 to fix some bugs (#8354) * Fix column name ambiguity in GetUserIssueStats() (#8347) * Change general form binding to gogs form (#8334) @@ -5192,7 +5192,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Add migration step to remove old repo_indexer_status orphaned records (#7746) * Fix repo_index_status lingering when deleting a repository (#7734) * Remove camel case tokenization from repo indexer (#7733) - * Fix milestone completness calculation when migrating (#7725) + * Fix milestone completeness calculation when migrating (#7725) * Regression: Include "executable" files in the index, as they are not necessarily … (#7718) * Fixes indexed repos keeping outdated indexes when files grow too large (#7712) * Skip non-regular files (e.g. submodules) on repo indexing (#7711) @@ -5201,7 +5201,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * improve branches list performance and fix protected branch icon when no-login (#7695) * Correct wrong datetime format for git (#7689) * Move add to hook queue for created repo to outside xorm session. (#7675) - * sugestion to use range .Branches (#7674) + * suggestion to use range .Branches (#7674) * Fix bug on migrating milestone from github (#7665) * hide delete/restore button on archived repos (#7658) * css: use flex to fix floating paginate (#7656) @@ -5300,10 +5300,10 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Added total count of contributions to heatmap (#7517) * Move mirror to a standalone package from models (#7486) * Move models.PushUpdate to repofiles.PushUpdate (#7485) - * Include thread related headers in issue/coment mail (#7484) + * Include thread related headers in issue/comment mail (#7484) * Refuse merge until all required status checks success (#7481) * convert all js var to let/const (#7464) - * Only create branches for opened pull requestes when migrating from github (#7463) + * Only create branches for opened pull requests when migrating from github (#7463) * jQuery 3 (#7425) * Add notification placeholder (#7409) * Search Commits via Commit Hash (#7400) @@ -5312,7 +5312,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Display original author and URL information when showing migrated issues/comments (#7352) * Refactor filetype is not allowed errors (#7309) * switch to use gliderlabs/ssh for builtin server (#7250) - * Remove settting dependency on modules/session (#7237) + * Remove setting dependency on modules/session (#7237) * Move all mail related codes from models to services/mailer (#7200) * Support git.PATH entry in app.ini (#6772) * Support setting cookie domain (#6288) @@ -5340,7 +5340,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Use "Pull Request" instead of "Merge Request" (#8003) * Move line number to :before attr to hide from search on browser (#8002) * Changed black color to white for (read) number label on issue list page (#8000) - * [Branch View] show "New Pull Request" Button only if posible (#7977) + * [Branch View] show "New Pull Request" Button only if possible (#7977) * Fix hook problem by only setting the git environment variables if we are passed them (#7854) * Prevent Commit Status and Message From Overflowing On Branch Page (#7800) * Fix global search result CSS, misc CSS tweaks (#7789) @@ -5353,7 +5353,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Add Extra Info to Branches Page (#7461) * Bump lodash from 4.17.11 to 4.17.14 (#7459) * wiki history improvements (#7391) - * ui fixes - compare view and archieved repo issues (#7345) + * ui fixes - compare view and archived repo issues (#7345) * dark theme scrollbars (#7269) * wiki - editor - add buttons 'inline code', 'empty checkbox', 'checked checkbox' (#7243) * Fix Statuses API only shows first 10 statuses: Add paging and extend API GetCommitStatuses (#7141) @@ -5472,7 +5472,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Fix rename failed when rewrite public keys (#7761) (#7769) * Fix dropTableColumns sqlite implementation (#7710) (#7765) * Fix repo_index_status lingering when deleting a repository (#7738) - * Fix milestone completness calculation when migrating (#7725) (#7732) + * Fix milestone completeness calculation when migrating (#7725) (#7732) * Fixes indexed repos keeping outdated indexes when files grow too large (#7731) * Skip non-regular files (e.g. submodules) on repo indexing (#7717) * Improve branches list performance and fix protected branch icon when no-login (#7695) (#7704) @@ -5487,7 +5487,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Fix markdown invoke sequence (#7513) (#7560) * Reserve .well-known username (#7638) * Do not leak secrets via timing side channel (#7364) - * Ensure that decryption of cookie actually suceeds (#7363) + * Ensure that decryption of cookie actually succeeds (#7363) * FEATURES * Content API for Creating, Updating, Deleting Files (#6314) * Enable tls-alpn-01: Use certmanager provided TLSConfig for LetsEncrypt (#7229) @@ -5551,7 +5551,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Fix api route for hooks (#7346) * Fix bug conflict between SyncReleasesWithTags and InsertReleases (#7337) * Fix pull view ui merge section (#7335) - * Fix 7303 - remove unnessesary buttons on archived repos (#7326) + * Fix 7303 - remove unnecessary buttons on archived repos (#7326) * Fix topic bar to allow prefixes (#7325) * Fixes #7152 - Allow create/update/delete message to be empty, use default message (#7324) * Fixes #7238 - Annotated tag commit ID incorrect (#7321) @@ -5587,7 +5587,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Fix #732: Add LFS objects to base repository on merging (#7082) * Install page - Handle invalid administrator username better (#7060) * Workaround for posting single comments in split diff view (#7052) - * Fix possbile mysql invalid connnection error (#7051) + * Fix possible mysql invalid connection error (#7051) * Fix charset was not saved after installation finished (#7048) * Handle insecure and ports in go get (#7041) * Avoid bad database state after failed migration (#7040) @@ -5709,7 +5709,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Change UpdateRepoIndex api to include watchers (#7012) * Move serv hook functionality & drop GitLogger (#6993) * Add support of utf8mb4 for mysql (#6992) - * Make webhook http connections resuable (#6976) + * Make webhook http connections reusable (#6976) * Move xorm logger bridge from log to models so that log module could be a standalone package (#6944) * Refactor models.NewRepoContext to extract git related codes to modules/git (#6941) * Remove macaron dependent on models (#6940) @@ -5793,7 +5793,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Add title attributes to all items in the repo list viewer (#6258) * Issue indexer queue redis support (#6218) * Add bio field for user (#6113) - * Make the version within makefile overwriteable (#6080) + * Make the version within makefile overwritable (#6080) * Updates to API 404 responses (#6077) * Use Go1.11 module (#5743) * UX + Security current user password reset (#5042) @@ -5849,7 +5849,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be ## [1.8.2](https://github.com/go-gitea/gitea/releases/tag/v1.8.2) - 2019-05-29 * BUGFIXES - * Fix possbile mysql invalid connnection error (#7051) (#7071) + * Fix possible mysql invalid connection error (#7051) (#7071) * Handle invalid administrator username on install page (#7060) (#7063) * Disable arm7 builds (#7037) (#7042) * Fix default for allowing new organization creation for new users (#7017) (#7034) @@ -6280,7 +6280,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Fix data race on migrate repository (#5224) * Fix sqlite and mssql lock (#5214) * Fix sqlite lock (#5210) - * Fix: Accept web-command cli flags if web-command is commited (#5200) + * Fix: Accept web-command cli flags if web-command is committed (#5200) * Fix: Add secret to all webhook's payload where it has been missing (#5199) * Fix race on updatesize (#5190) * Fix create team, update team missing units (#5188) @@ -6477,7 +6477,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Don't display buttons if there are no system notifications (#4280) * Issue due date api (#3890) * BUGFIXES - * dont' send assign webhooks when creating issue (#5365) + * Don't send assign webhooks when creating issue (#5365) * Fix create team, update team missing units (#5188) * Fix file edit change preview functionality (#5300) * *ix bug when users have serval teams with different units on different repositories (#5307) @@ -6485,7 +6485,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Fix markdown image with link (#4675) * Remove maxlines option for file logger (#5282) * Fix wrong api request url for instances running in subfolders (#5261) (#5247) - * Accept web-command cli flags if web-command is commited (#5245) (#5200) + * Accept web-command cli flags if web-command is committed (#5245) (#5200) * Reduce join star, repo_topic, topic tables on repo search, to resolve extra columns problem on MSSQL (#5136) (#5229) * Fix data race on migrate repository (#5224) (#5230) * Add secret to all webhook's payload where it has been missing (#5208) (#5199) @@ -6518,7 +6518,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Fix missing release title in webhook (#4783) (#4796) * User shouldn't be able to approve or reject his/her own PR (#4729) * Make sure to reset commit count in the cache on mirror syncing (#4720) - * Fixed bug where team with admin privelege type doesn't get any unit (#4719) + * Fixed bug where team with admin privilege type doesn't get any unit (#4719) * Fix incorrect caption of webhook setting (#4701) (#4717) * Allow WIP marker to contains < or > (#4709) * Hide org/create menu item in Dashboard if user has no rights (#4678) (#4680) @@ -6541,7 +6541,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Update xorm to latest version and fix correct `user` table referencing in sql (#4473) * Relative URLs for LibreJS page (#4460) * Redirect to correct page after using scratch token (#4458) - * Fix column droping for MSSQL that need new transaction for that (#4440) + * Fix column dropping for MSSQL that need new transaction for that (#4440) * Replace src with raw to fix image paths (#4377) * Add default merge options when creating new repository (#4369) * Fix docker build (#4358) @@ -6584,7 +6584,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * BUGFIXES * Fix missing release title in webhook (#4783) (#4800) * Make sure to reset commit count in the cache on mirror syncing (#4770) - * Fixed bug where team with admin privelege type doesn't get any unit (#4759) + * Fixed bug where team with admin privilege type doesn't get any unit (#4759) * Fix failure on creating pull request with assignees (#4583) (#4727) * Hide org/create menu item in Dashboard if user has no rights (#4678) (#4686) * TRANSLATION @@ -6597,7 +6597,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Limit uploaded avatar image-size to 4096px x 3072px by default (#4353) * Do not allow to reuse TOTP passcode (#3878) * BUGFIXES - * Fix column droping for MSSQL that need new transaction for that (#4440) (#4484) + * Fix column dropping for MSSQL that need new transaction for that (#4440) (#4484) * Redirect to correct page after using scratch token (#4458) (#4472) * Replace src with raw to fix image paths (#4377) (#4386) * Fixes repo membership check in API (#4341) (#4379) @@ -6640,7 +6640,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Add repository search ordered by stars/forks. Forks column in admin repo list (#3969) * Add Environment Variables to Docker template (#4012) * LFS: make HTTP auth period configurable (#4035) - * Add config path as an optionial flag when changing pass via CLI (#4184) + * Add config path as an optional flag when changing pass via CLI (#4184) * Refactor User Settings sections (#3900) * Allow square brackets in external issue patterns (#3408) * Add Attachment API (#3478) @@ -6689,7 +6689,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Add "error" as reserved username (#3882) (#3886) * SECURITY * Do not allow inactive users to access repositories using private key (#3887) (#3889) - * Fix path cleanup in file editor, when initilizing new repository and LFS oids (#3871) (#3873) + * Fix path cleanup in file editor, when initializing new repository and LFS oids (#3871) (#3873) * Remove unnecessary allowed safe HTML (#3778) (#3779) * Correctly check http git access rights for reverse proxy authorized users (#3721) (#3743) * BUGFIXES @@ -6741,7 +6741,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Add content type and doctype to requests made with go-get (#3426, #3423) * Fix SQL type error for webhooks (#3424) * Fix PR merge error (#3421) - * Recognize more characters in crossreferenced repo name (#3413) + * Recognize more characters in cross-referenced repo name (#3413) * Fix MSSQL bug on org (#3405) * HTML escape all lines of the search result (#3402) * Change local copy origin url after repository rename (#3399) @@ -6787,7 +6787,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Open external tracker in blank window, consistently with wiki (#3227) * Fix repo links on user profile (#3197) * Enable emoji for wiki view (#3158) - * Small improve on deleting attachements (#3145) + * Small improve on deleting attachments (#3145) * Reduce overhead of upgrades for users with custom stylesheets/JS (#3051) * Default log level to Info without hardcoding it in installer (#3041) * Memory usage improvements (#3013) @@ -6935,7 +6935,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Fix inconsistencies in user settings UI (#2901) * Fix attachments icon size on zoom in/out (#2853) * Fix ignored errors in API route (#2850) - * Fix activity css conflit with semantic ui (#2758) + * Fix activity css conflict with semantic ui (#2758) * Fix notifications tabs according to semantic-ui docs (#2733) * Fix typos in app.ini (#2732) * Fix duplicated rel attribute (#2549) @@ -6964,7 +6964,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Allow custom SSH user in UI for built-in SSH server (#2617) (#2678) * Refactor duplicated code in repo handlers (#2657) * Replace deprecated Id method with ID (#2655) - * Remove redudant functions and code (#2652) + * Remove redundant functions and code (#2652) * hide navbar when only 1 sign-in method is available (#2444) (#2648) * Change default sort order (#2647) * Change pull description text (#2075) (#2646) @@ -6972,9 +6972,9 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Use session when creating user (#2638) * Use Semantic UI's Search component for user and repo search (#2636) * Use AfterLoad instead of AfterSet on Structs (#2628) - * Remove redudant CheckUnit calls in router (#2627) + * Remove redundant CheckUnit calls in router (#2627) * Remove repo unit index (#2621) - * Remove redudant issue LoadAttributes() calls (#2614) + * Remove redundant issue LoadAttributes() calls (#2614) * Make indexer code more reusable (#2590) * Use custom type and constants to hold available order by options (#2572) * Use named ActionType constants in template helper (#2545) @@ -7331,8 +7331,8 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * fix #1501 ssh hangs caused by #1461 (#1513) * Fix empty file download (#1506) * Fix broken v27 migration - change mirror interval from int to bigint (#1504) - * Do not allow commiting to protected branch from online editor (#1502) - * Add internal routes for ssh hook comands (#1471) + * Do not allow committing to protected branch from online editor (#1502) + * Add internal routes for ssh hook commands (#1471) * Fix races within code.gitea.io/git.(*Command).RunInDirTimeoutPipeline (#1465) * Simple quick fix for #1418 (#1456) * fix gpg API panic when no verification (#1451) @@ -7359,7 +7359,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Make sure both scripts/ can live side by side (#1264) * Fix nil-dereference bug (#1258) * rewrite pre-commit, post-commit and options hooks (fixes #1250) (#1257) - * Commit search appearence fixes (#1254) + * Commit search appearance fixes (#1254) * Fix forget migration for wiki hooks (#1227) * Fix repo settings external tracker failed and check external urls (#1215) * Fix 500 caused by branches settings introduced by #1198 (#1214) @@ -7392,7 +7392,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Don't recreate database in integration tests (#1697) * remove sqlite tag when integration test with mysql/postgres and recreate database when init integration test (#1693) * MySQL, Postgres integration tests in drone (#1638) - * improve integration test to resue models/fixtures and store git repos with tests (#1627) + * improve integration test to reuse models/fixtures and store git repos with tests (#1627) * Improve govendor testing (#1623) * Integration test framework (#1290) * Unit tests for issue_list (#1209) @@ -7443,7 +7443,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Only run coverage on merges/pushes to master (#1783) * Remove stale rule from Makefile (#1782) * feat: upgrade drone docker image to support multi-stage build. (#1732) - * Realy don't cache apk index (#1694) + * Really don't cache apk index (#1694) * Limit clone depth when drone-building (#1644) * Refactor Dockerfile (#1632) * Check if missing/modified/unused deps in vendor and fix errors (#1468) @@ -7502,12 +7502,12 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Prevent selection of diff line numbers (#2240) * Remove unused variable on makefile (#2225) * No error log entries for repo 404 (#2200) - * Refactor vue delimeters to use es6 template delimeters (#2171) + * Refactor vue delimiters to use es6 template delimiters (#2171) * Replace tmp with TMPDIR. (#2152) * Remove unused files (#2124) * Improve org error handling (#2117) * Absolute path for setting.CustomConf (#2085) - * remove deprecated code for Gogs compitable (#2041) + * remove deprecated code for Gogs compatible (#2041) * Refactor session close as xorm already does everything needed internally (#2020) * SQLite has a query timeout. Hopefully fixes most 'database locked' errors (#1961) * Use monospace font in githook editor (#1958) @@ -7515,7 +7515,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Gracefully handle bare repositories on API operations. (#1932) * Fix errors caused by force push (#1927) * Display URLs in integration test logs (#1924) - * Set TMPDIR enviroment variable for dump command (#1915) + * Set TMPDIR environment variable for dump command (#1915) * Cache ctx.User in retrieveFeeds (#1902) * Make `LocalCopyPath` a setting instead of a hard-coded path (#1881) * Add check misspelling (#1877) @@ -7524,7 +7524,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Rename misnamed migration (#1867) * Support CRLF when splitting code lines for display (#1862) * Add convert less css file step. (#1861) - * Prevent accidential selection of line numbers in code view (#1860) + * Prevent accidental selection of line numbers in code view (#1860) * Delete Public SSH Key tmp file after calculating fingerprint (#1855) * Remove annoying difference in button heights. (#1853) * Only run test coverage on master branch. (#1838) @@ -7534,7 +7534,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be * Rename RepoCreationNum -> MaxCreationLimit (#1766) * Add button to admin ui (#1738) * Correct spelling mistakes (#1703) - * Make openid support default false for compitable with v1.1 (#1650) + * Make openid support default false for compatible with v1.1 (#1650) * Send mails as HTML as default. Setting for send as plain text. (#1648) * fix potential lock when sqlite (#1647) * Optimize png images via Google zopflipng [ci skip] (#1639) diff --git a/cmd/hook.go b/cmd/hook.go index f38fd8831b8d5..8ea7b6abc3b64 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -696,7 +696,7 @@ Gitea or set your environment appropriately.`, "") type pktLineType int64 const ( - // UnKnow type + // unknown type pktLineTypeUnknow pktLineType = 0 // flush-pkt "0000" pktLineTypeFlush pktLineType = iota diff --git a/contrib/backport/README b/contrib/backport/README index 1e84c1bb9743f..466b79c6d4905 100644 --- a/contrib/backport/README +++ b/contrib/backport/README @@ -11,7 +11,7 @@ The default version will read from `docs/config.yml`. You can override this using the option `--version`. The upstream branches will be fetched, using the remote `origin`. This can -be overrided using `--upstream`, and fetching can be avoided using +be overridden using `--upstream`, and fetching can be avoided using `--no-fetch`. By default the branch created will be called `backport-$PR-$VERSION`. You diff --git a/docs/content/administration/config-cheat-sheet.en-us.md b/docs/content/administration/config-cheat-sheet.en-us.md index f30e0e246a83b..8648839be446f 100644 --- a/docs/content/administration/config-cheat-sheet.en-us.md +++ b/docs/content/administration/config-cheat-sheet.en-us.md @@ -853,7 +853,7 @@ Default templates for project boards: - `ResponseWriter`: the responseWriter from the request. - `RequestID`: the value matching REQUEST_ID_HEADERS(default: `-`, if not matched). - You must be very careful to ensure that this template does not throw errors or panics as this template runs outside the panic/recovery script. -- `REQUEST_ID_HEADERS`: **_empty_**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log. +- `REQUEST_ID_HEADERS`: **_empty_**: You can configure multiple values that are split by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log. - e.g. - In the Request Header: X-Request-ID: **test-id-123** - Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID @@ -1268,7 +1268,7 @@ Default storage configuration for attachments, lfs, avatars, repo-avatars, repo- - `MINIO_USE_SSL`: **false**: Minio enabled ssl only available when `STORAGE_TYPE` is `minio` - `MINIO_INSECURE_SKIP_VERIFY`: **false**: Minio skip SSL verification available when STORAGE_TYPE is `minio` -The recommanded storage configuration for minio like below: +The recommended storage configuration for minio like below: ```ini [storage] @@ -1303,7 +1303,7 @@ Defaultly every storage has their default base path like below | actions_log | actions_log/ | | actions_artifacts | actions_artifacts/ | -And bucket, basepath or `SERVE_DIRECT` could be special or overrided, if you want to use a different you can: +And bucket, basepath or `SERVE_DIRECT` could be special or overridden, if you want to use a different you can: ```ini [storage.actions_log] @@ -1388,7 +1388,7 @@ Please note that using `self` is not recommended for most cases, as it could mak Additionally, it requires you to mirror all the actions you need to your Gitea instance, which may not be worth it. Therefore, please use `self` only if you understand what you are doing. -In earlier versions (<= 1.19), `DEFAULT_ACTIONS_URL` cound be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`. +In earlier versions (<= 1.19), `DEFAULT_ACTIONS_URL` could be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`. However, later updates removed those options, and now the only options are `github` and `self`, with the default value being `github`. However, if you want to use actions from other git server, you can use a complete URL in `uses` field, it's supported by Gitea (but not GitHub). Like `uses: https://gitea.com/actions/checkout@v3` or `uses: http://your-git-server/actions/checkout@v3`. diff --git a/docs/content/administration/config-cheat-sheet.zh-cn.md b/docs/content/administration/config-cheat-sheet.zh-cn.md index a2fa25df92968..b991c6a70bf21 100644 --- a/docs/content/administration/config-cheat-sheet.zh-cn.md +++ b/docs/content/administration/config-cheat-sheet.zh-cn.md @@ -423,7 +423,7 @@ Attachments, lfs, avatars, repo-avatars, repo-archive, packages, actions_log, ac - `MINIO_LOCATION`: **us-east-1**: Minio location to create bucket,仅当 `STORAGE_TYPE` 是 `minio` 时有效。 - `MINIO_USE_SSL`: **false**: Minio enabled ssl,仅当 `STORAGE_TYPE` 是 `minio` 时有效。 -以下为推荐的 recommanded storage configuration for minio like below: +以下为推荐的 recommended storage configuration for minio like below: ```ini [storage] diff --git a/docs/content/usage/packages/storage.en-us.md b/docs/content/usage/packages/storage.en-us.md index f437412dcc626..1bcbbba1d0b3c 100644 --- a/docs/content/usage/packages/storage.en-us.md +++ b/docs/content/usage/packages/storage.en-us.md @@ -19,7 +19,7 @@ This document describes the storage of the package registry and how it can be ma ## Deduplication -The package registry has a build-in deduplication of uploaded blobs. +The package registry has a built-in deduplication of uploaded blobs. If two identical files are uploaded only one blob is saved on the filesystem. This ensures no space is wasted for duplicated files. diff --git a/models/actions/task.go b/models/actions/task.go index 9cc0fd0df83db..b31afb2126be6 100644 --- a/models/actions/task.go +++ b/models/actions/task.go @@ -278,7 +278,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask if gots, err := jobparser.Parse(job.WorkflowPayload); err != nil { return nil, false, fmt.Errorf("parse workflow of job %d: %w", job.ID, err) } else if len(gots) != 1 { - return nil, false, fmt.Errorf("workflow of job %d: not signle workflow", job.ID) + return nil, false, fmt.Errorf("workflow of job %d: not single workflow", job.ID) } else { _, workflowJob = gots[0].Job() } diff --git a/models/actions/tasks_version.go b/models/actions/tasks_version.go index 5c0a86538d570..d8df3535936a6 100644 --- a/models/actions/tasks_version.go +++ b/models/actions/tasks_version.go @@ -13,7 +13,7 @@ import ( // ActionTasksVersion // If both ownerID and repoID is zero, its scope is global. -// If ownerID is not zero and repoID is zero, its scope is org (there is no user-level runner currrently). +// If ownerID is not zero and repoID is zero, its scope is org (there is no user-level runner currently). // If ownerID is zero and repoID is not zero, its scope is repo. type ActionTasksVersion struct { ID int64 `xorm:"pk autoincr"` diff --git a/models/auth/oauth2.go b/models/auth/oauth2.go index 0f64b56c1635b..d0173f7f3c31c 100644 --- a/models/auth/oauth2.go +++ b/models/auth/oauth2.go @@ -526,7 +526,7 @@ func (err ErrOAuthApplicationNotFound) Unwrap() error { return util.ErrNotExist } -// GetActiveOAuth2ProviderSources returns all actived LoginOAuth2 sources +// GetActiveOAuth2ProviderSources returns all activated LoginOAuth2 sources func GetActiveOAuth2ProviderSources() ([]*Source, error) { sources := make([]*Source, 0, 1) if err := db.GetEngine(db.DefaultContext).Where("is_active = ? and type = ?", true, OAuth2).Find(&sources); err != nil { diff --git a/models/auth/oauth2_test.go b/models/auth/oauth2_test.go index 80d0e9baa4813..fa421fc7240e4 100644 --- a/models/auth/oauth2_test.go +++ b/models/auth/oauth2_test.go @@ -59,7 +59,7 @@ func TestOAuth2Application_ContainsRedirectURI_WithPort(t *testing.T) { // not loopback assert.False(t, app.ContainsRedirectURI("http://192.168.0.1:9954/")) assert.False(t, app.ContainsRedirectURI("http://intranet:3456/")) - // unparseable + // unparsable assert.False(t, app.ContainsRedirectURI(":")) } diff --git a/models/fixtures/pull_request.yml b/models/fixtures/pull_request.yml index 165437f0328dd..aeacc63d72797 100644 --- a/models/fixtures/pull_request.yml +++ b/models/fixtures/pull_request.yml @@ -1,7 +1,7 @@ - id: 1 type: 0 # gitea pull request - status: 2 # mergable + status: 2 # mergeable issue_id: 2 index: 2 head_repo_id: 1 @@ -15,7 +15,7 @@ - id: 2 type: 0 # gitea pull request - status: 2 # mergable + status: 2 # mergeable issue_id: 3 index: 3 head_repo_id: 1 @@ -28,7 +28,7 @@ - id: 3 type: 0 # gitea pull request - status: 2 # mergable + status: 2 # mergeable issue_id: 8 index: 1 head_repo_id: 11 @@ -41,7 +41,7 @@ - id: 4 type: 0 # gitea pull request - status: 2 # mergable + status: 2 # mergeable issue_id: 9 index: 1 head_repo_id: 48 @@ -54,7 +54,7 @@ - id: 5 # this PR is outdated (one commit behind branch1 ) type: 0 # gitea pull request - status: 2 # mergable + status: 2 # mergeable issue_id: 11 index: 5 head_repo_id: 1 @@ -67,7 +67,7 @@ - id: 6 type: 0 # gitea pull request - status: 2 # mergable + status: 2 # mergeable issue_id: 12 index: 2 head_repo_id: 3 diff --git a/models/git/branch.go b/models/git/branch.go index c68da1be78062..2a1710624b7e9 100644 --- a/models/git/branch.go +++ b/models/git/branch.go @@ -206,7 +206,7 @@ func DeleteBranches(ctx context.Context, repoID, doerID int64, branchIDs []int64 } // UpdateBranch updates the branch information in the database. If the branch exist, it will update latest commit of this branch information -// If it doest not exist, insert a new record into database +// If it does not exist, insert a new record into database func UpdateBranch(ctx context.Context, repoID, pusherID int64, branchName string, commit *git.Commit) error { cnt, err := db.GetEngine(ctx).Where("repo_id=? AND name=?", repoID, branchName). Cols("commit_id, commit_message, pusher_id, commit_time, is_deleted, updated_unix"). diff --git a/models/git/branch_test.go b/models/git/branch_test.go index ba6902692792e..bd43bff11e937 100644 --- a/models/git/branch_test.go +++ b/models/git/branch_test.go @@ -114,7 +114,7 @@ func TestFindRenamedBranch(t *testing.T) { assert.True(t, exist) assert.Equal(t, "master", branch.To) - _, exist, err = git_model.FindRenamedBranch(db.DefaultContext, 1, "unknow") + _, exist, err = git_model.FindRenamedBranch(db.DefaultContext, 1, "unknown") assert.NoError(t, err) assert.False(t, exist) } diff --git a/models/issues/label_test.go b/models/issues/label_test.go index 1bc5a1a93544f..ddf8e521b1ee9 100644 --- a/models/issues/label_test.go +++ b/models/issues/label_test.go @@ -257,7 +257,7 @@ func TestGetLabelsByIssueID(t *testing.T) { func TestUpdateLabel(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) label := unittest.AssertExistsAndLoadBean(t, &issues_model.Label{ID: 1}) - // make sure update wont overwrite it + // make sure update won't overwrite it update := &issues_model.Label{ ID: label.ID, Color: "#ffff00", diff --git a/models/issues/pull.go b/models/issues/pull.go index cedbb62c3cb59..843469a0e932b 100644 --- a/models/issues/pull.go +++ b/models/issues/pull.go @@ -812,7 +812,7 @@ func UpdateAllowEdits(ctx context.Context, pr *PullRequest) error { // Mergeable returns if the pullrequest is mergeable. func (pr *PullRequest) Mergeable() bool { - // If a pull request isn't mergable if it's: + // If a pull request isn't mergeable if it's: // - Being conflict checked. // - Has a conflict. // - Received a error while being conflict checked. diff --git a/models/issues/tracked_time.go b/models/issues/tracked_time.go index 58c6b775f0778..df2ad2df5dfa8 100644 --- a/models/issues/tracked_time.go +++ b/models/issues/tracked_time.go @@ -173,8 +173,8 @@ func AddTime(ctx context.Context, user *user_model.User, issue *Issue, amount in Issue: issue, Repo: issue.Repo, Doer: user, - // Content before v1.21 did store the formated string instead of seconds, - // so use "|" as delimeter to mark the new format + // Content before v1.21 did store the formatted string instead of seconds, + // so use "|" as delimiter to mark the new format Content: fmt.Sprintf("|%d", amount), Type: CommentTypeAddTimeManual, TimeID: t.ID, @@ -253,8 +253,8 @@ func DeleteIssueUserTimes(issue *Issue, user *user_model.User) error { Issue: issue, Repo: issue.Repo, Doer: user, - // Content before v1.21 did store the formated string instead of seconds, - // so use "|" as delimeter to mark the new format + // Content before v1.21 did store the formatted string instead of seconds, + // so use "|" as delimiter to mark the new format Content: fmt.Sprintf("|%d", removedTime), Type: CommentTypeDeleteTimeManual, }); err != nil { @@ -284,8 +284,8 @@ func DeleteTime(t *TrackedTime) error { Issue: t.Issue, Repo: t.Issue.Repo, Doer: t.User, - // Content before v1.21 did store the formated string instead of seconds, - // so use "|" as delimeter to mark the new format + // Content before v1.21 did store the formatted string instead of seconds, + // so use "|" as delimiter to mark the new format Content: fmt.Sprintf("|%d", t.Time), Type: CommentTypeDeleteTimeManual, }); err != nil { diff --git a/models/migrations/v1_17/v216.go b/models/migrations/v1_17/v216.go index 59b21d9b2c465..268f472a4250f 100644 --- a/models/migrations/v1_17/v216.go +++ b/models/migrations/v1_17/v216.go @@ -4,4 +4,4 @@ package v1_17 //nolint // This migration added non-ideal indices to the action table which on larger datasets slowed things down -// it has been superceded by v218.go +// it has been superseded by v218.go diff --git a/models/user/setting_keys.go b/models/user/setting_keys.go index 72b3974eee435..0e2c93695a573 100644 --- a/models/user/setting_keys.go +++ b/models/user/setting_keys.go @@ -8,7 +8,7 @@ const ( SettingsKeyHiddenCommentTypes = "issue.hidden_comment_types" // SettingsKeyDiffWhitespaceBehavior is the setting key for whitespace behavior of diff SettingsKeyDiffWhitespaceBehavior = "diff.whitespace_behaviour" - // SettingsKeyShowOutdatedComments is the setting key wether or not to show outdated comments in PRs + // SettingsKeyShowOutdatedComments is the setting key whether or not to show outdated comments in PRs SettingsKeyShowOutdatedComments = "comment_code.show_outdated" // UserActivityPubPrivPem is user's private key UserActivityPubPrivPem = "activitypub.priv_pem" diff --git a/modules/avatar/identicon/identicon.go b/modules/avatar/identicon/identicon.go index 9b7a2faf05b50..f6f9578ccdea0 100644 --- a/modules/avatar/identicon/identicon.go +++ b/modules/avatar/identicon/identicon.go @@ -70,7 +70,7 @@ func (i *Identicon) render(c, b1, b2, b1Angle, b2Angle, foreColor int) image.Ima /* # Algorithm -Origin: An image is splitted into 9 areas +Origin: An image is split into 9 areas ``` ------------- diff --git a/modules/context/csrf.go b/modules/context/csrf.go index 9b0dc2923b532..57c55e655037d 100644 --- a/modules/context/csrf.go +++ b/modules/context/csrf.go @@ -179,7 +179,7 @@ func PrepareCSRFProtector(opt CsrfOptions, ctx *Context) CSRFProtector { if uidChanged { _ = ctx.Session.Set(opt.oldSessionKey, x.ID) } else if cookieToken != "" { - // If cookie token presents, re-use existing unexpired token, else generate a new one. + // If cookie token presents, reuse existing unexpired token, else generate a new one. if issueTime, ok := ParseCsrfToken(cookieToken); ok { dur := time.Since(issueTime) // issueTime is not a monotonic-clock, the server time may change a lot to an early time. if dur >= -CsrfTokenRegenerationInterval && dur <= CsrfTokenRegenerationInterval { diff --git a/modules/doctor/dbconsistency.go b/modules/doctor/dbconsistency.go index 541fc736f44b6..a135566622865 100644 --- a/modules/doctor/dbconsistency.go +++ b/modules/doctor/dbconsistency.go @@ -74,7 +74,7 @@ func genericOrphanCheck(name, subject, refobject, joincond string) consistencyCh } func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) error { - // make sure DB version is uptodate + // make sure DB version is up-to-date if err := db.InitEngineWithMigration(ctx, migrations.EnsureUpToDate); err != nil { logger.Critical("Model version on the database does not match the current Gitea version. Model consistency will not be checked until the database is upgraded") return err diff --git a/modules/git/ref.go b/modules/git/ref.go index ad251515e7dbb..062cb84e6a3fd 100644 --- a/modules/git/ref.go +++ b/modules/git/ref.go @@ -184,7 +184,7 @@ func (ref RefName) RefGroup() string { } // RefType returns the simple ref type of the reference, e.g. branch, tag -// It's differrent from RefGroup, which is using the name of the directory under .git/refs +// It's different from RefGroup, which is using the name of the directory under .git/refs // Here we using branch but not heads, using tag but not tags func (ref RefName) RefType() string { var refType string diff --git a/modules/gitgraph/graph_models.go b/modules/gitgraph/graph_models.go index 748f7f307574e..dc32014049ce3 100644 --- a/modules/gitgraph/graph_models.go +++ b/modules/gitgraph/graph_models.go @@ -180,7 +180,7 @@ func (flow *Flow) AddGlyph(row, column int, glyph byte) { }) } -// Glyph represents a co-ordinate and glyph +// Glyph represents a coordinate and glyph type Glyph struct { Row int Column int @@ -234,7 +234,7 @@ func newRefsFromRefNames(refNames []byte) []git.Reference { return refs } -// Commit represents a commit at co-ordinate X, Y with the data +// Commit represents a commit at coordinate X, Y with the data type Commit struct { Commit *git.Commit User *user_model.User diff --git a/modules/indexer/code/git.go b/modules/indexer/code/git.go index 1ba6b849d11db..92ae139826e24 100644 --- a/modules/indexer/code/git.go +++ b/modules/indexer/code/git.go @@ -113,7 +113,7 @@ func nonGenesisChanges(ctx context.Context, repo *repo_model.Repository, revisio } fields := strings.Split(line, "\t") if len(fields) < 2 { - log.Warn("Unparseable output for diff --name-status: `%s`)", line) + log.Warn("Unparsable output for diff --name-status: `%s`)", line) continue } filename := fields[1] @@ -133,12 +133,12 @@ func nonGenesisChanges(ctx context.Context, repo *repo_model.Repository, revisio changes.RemovedFilenames = append(changes.RemovedFilenames, filename) case 'R', 'C': if len(fields) < 3 { - log.Warn("Unparseable output for diff --name-status: `%s`)", line) + log.Warn("Unparsable output for diff --name-status: `%s`)", line) continue } dest := fields[2] if len(dest) == 0 { - log.Warn("Unparseable output for diff --name-status: `%s`)", line) + log.Warn("Unparsable output for diff --name-status: `%s`)", line) continue } if dest[0] == '"' { diff --git a/modules/log/event_format.go b/modules/log/event_format.go index 524ca3dd872ed..ed0c4184b1956 100644 --- a/modules/log/event_format.go +++ b/modules/log/event_format.go @@ -205,7 +205,7 @@ func EventFormatTextMessage(mode *WriterMode, event *Event, msgFormat string, ms msg = []byte(fmt.Sprintf(msgFormat, msgArgs...)) } } - // try to re-use the pre-formatted simple text message + // try to reuse the pre-formatted simple text message if len(msg) == 0 { msg = []byte(event.MsgSimpleText) } diff --git a/modules/process/manager.go b/modules/process/manager.go index 9c21f6215210f..bdc4931810d1c 100644 --- a/modules/process/manager.go +++ b/modules/process/manager.go @@ -134,7 +134,7 @@ func (pm *Manager) AddTypedContext(parent context.Context, description, processT // // Most processes will not need to use the cancel function but there will be cases whereby you want to cancel the process but not immediately remove it from the // process table. -func (pm *Manager) AddContextTimeout(parent context.Context, timeout time.Duration, description string) (ctx context.Context, cancel context.CancelFunc, finshed FinishedFunc) { +func (pm *Manager) AddContextTimeout(parent context.Context, timeout time.Duration, description string) (ctx context.Context, cancel context.CancelFunc, finished FinishedFunc) { if timeout <= 0 { // it's meaningless to use timeout <= 0, and it must be a bug! so we must panic here to tell developers to make the timeout correct panic("the timeout must be greater than zero, otherwise the context will be cancelled immediately") @@ -142,9 +142,9 @@ func (pm *Manager) AddContextTimeout(parent context.Context, timeout time.Durati ctx, cancel = context.WithTimeout(parent, timeout) - ctx, _, finshed = pm.Add(ctx, description, cancel, NormalProcessType, true) + ctx, _, finished = pm.Add(ctx, description, cancel, NormalProcessType, true) - return ctx, cancel, finshed + return ctx, cancel, finished } // Add create a new process diff --git a/modules/setting/storage.go b/modules/setting/storage.go index ed804a910a461..997eae460692a 100644 --- a/modules/setting/storage.go +++ b/modules/setting/storage.go @@ -102,11 +102,11 @@ func getStorage(rootCfg ConfigProvider, name, typ string, sec ConfigSection) (*S targetType := targetSec.Key("STORAGE_TYPE").String() if targetType == "" { if !IsValidStorageType(StorageType(typ)) { - return nil, fmt.Errorf("unknow storage type %q", typ) + return nil, fmt.Errorf("unknown storage type %q", typ) } targetSec.Key("STORAGE_TYPE").SetValue(typ) } else if !IsValidStorageType(StorageType(targetType)) { - return nil, fmt.Errorf("unknow storage type %q for section storage.%v", targetType, typ) + return nil, fmt.Errorf("unknown storage type %q for section storage.%v", targetType, typ) } } } diff --git a/modules/templates/helper_test.go b/modules/templates/helper_test.go index ec83e9ac33138..492e07b10ab10 100644 --- a/modules/templates/helper_test.go +++ b/modules/templates/helper_test.go @@ -48,7 +48,7 @@ func TestSubjectBodySeparator(t *testing.T) { test("Multiple\n---\n-------\n---\nSeparators", "Multiple\n", "\n-------\n---\nSeparators") - test("Insuficient\n--\nSeparators", + test("Insufficient\n--\nSeparators", "", - "Insuficient\n--\nSeparators") + "Insufficient\n--\nSeparators") } diff --git a/modules/typesniffer/typesniffer_test.go b/modules/typesniffer/typesniffer_test.go index 6c6da34aa006a..6cf435a0a9fab 100644 --- a/modules/typesniffer/typesniffer_test.go +++ b/modules/typesniffer/typesniffer_test.go @@ -48,12 +48,12 @@ func TestIsSvgImage(t *testing.T) { `)).IsSvgImage()) assert.True(t, DetectContentType([]byte(` - `)).IsSvgImage()) assert.True(t, DetectContentType([]byte(` - `)).IsSvgImage()) diff --git a/modules/util/color.go b/modules/util/color.go index 240b045c287a9..29f230ca13999 100644 --- a/modules/util/color.go +++ b/modules/util/color.go @@ -11,7 +11,7 @@ import ( // Check similar implementation in web_src/js/utils/color.js and keep synchronization -// Return R, G, B values defined in reletive luminance +// Return R, G, B values defined in relative luminance func getLuminanceRGB(channel float64) float64 { sRGB := channel / 255 if sRGB <= 0.03928 { diff --git a/modules/util/path.go b/modules/util/path.go index 58258560dded3..470e5bc58d893 100644 --- a/modules/util/path.go +++ b/modules/util/path.go @@ -46,7 +46,7 @@ func PathJoinRel(elem ...string) string { } // PathJoinRelX joins the path elements into a single path like PathJoinRel, -// and covert all backslashes to slashes. (X means "extended", also means the combination of `\` and `/`). +// and convert all backslashes to slashes. (X means "extended", also means the combination of `\` and `/`). // It's caller's duty to make every element not bypass its own directly level, to avoid security issues. // It returns similar results as PathJoinRel except: // diff --git a/pyproject.toml b/pyproject.toml index a2a386385922d..e4b973a14858b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,3 +13,15 @@ djlint = "1.32.0" [tool.djlint] profile="golang" ignore="H005,H006,H008,H013,H016,H020,H021,H030,H031" + +[tool.codespell] +skip = '.git,*.pdf,*.svg,package-lock.json,go.mod,locale,license,*.git,objects,*.fr-fr.*,*.de-de.*,*.css,go.sum,*.key,gitignore,pyproject.toml,diff_test.go,go-licenses.json' +# precise hits for CamelCased words,various other curious cases which require regex to ignore +# entire line or some portion of it +ignore-regex = '(\b(mx claus|commitT|ReadBy|#afile|respOne|commitI|[cC]rossReference)\b|shouldbe\.|women’s.*womens|"emoji":.*|,bu,|assert\.Equal.*"fo\b|github\.com/unknwon|Copyright 2014 Unknwon|allowed\.noone|[hH]eadErr|atLeast|{"\\U.*|\.metdata)' +#|.*(Maskenpflicht|Geimpft),.*)' +# te - TreeEntry variable +# commiter - wrong spelling but seems used in API +# ALLWAYS - is a config var +# infact - other variable(s) +ignore-words-list = 'crate,te,commiter,befores,allways,infact,startd' diff --git a/routers/api/actions/artifacts.go b/routers/api/actions/artifacts.go index 946ea11e75271..361383d307528 100644 --- a/routers/api/actions/artifacts.go +++ b/routers/api/actions/artifacts.go @@ -254,7 +254,7 @@ func (ar artifactRoutes) uploadArtifact(ctx *ArtifactContext) { }) } -// comfirmUploadArtifact comfirm upload artifact. +// comfirmUploadArtifact confirm upload artifact. // if all chunks are uploaded, merge them to one file. func (ar artifactRoutes) comfirmUploadArtifact(ctx *ArtifactContext) { _, runID, ok := validateRunID(ctx) diff --git a/routers/api/actions/runner/interceptor.go b/routers/api/actions/runner/interceptor.go index ddc754dbc722b..055bba6056972 100644 --- a/routers/api/actions/runner/interceptor.go +++ b/routers/api/actions/runner/interceptor.go @@ -36,7 +36,7 @@ var withRunner = connect.WithInterceptors(connect.UnaryInterceptorFunc(func(unar uuid := request.Header().Get(uuidHeaderKey) token := request.Header().Get(tokenHeaderKey) // TODO: version will be removed from request header after Gitea 1.20 released. - // And Gitea will not try to read version from reuqest header + // And Gitea will not try to read version from request header version := request.Header().Get(versionHeaderKey) runner, err := actions_model.GetRunnerByUUID(ctx, uuid) @@ -53,7 +53,7 @@ var withRunner = connect.WithInterceptors(connect.UnaryInterceptorFunc(func(unar cols := []string{"last_online"} // TODO: version will be removed from request header after Gitea 1.20 released. - // And Gitea will not try to read version from reuqest header + // And Gitea will not try to read version from request header version, _ = util.SplitStringAtByteN(version, 64) if !util.IsEmptyString(version) && runner.Version != version { runner.Version = version diff --git a/routers/api/actions/runner/runner.go b/routers/api/actions/runner/runner.go index 6de5964cb77bc..a102f4a3c620a 100644 --- a/routers/api/actions/runner/runner.go +++ b/routers/api/actions/runner/runner.go @@ -148,7 +148,7 @@ func (s *Service) FetchTask( if tasksVersion != latestVersion { // if the task version in request is not equal to the version in db, - // it means there may still be some tasks not be assgined. + // it means there may still be some tasks not be assigned. // try to pick a task for the runner that send the request. if t, ok, err := pickTask(ctx, runner); err != nil { log.Error("pick task failed: %v", err) diff --git a/routers/api/packages/README.md b/routers/api/packages/README.md index 533a0d32f0669..74d14922cb248 100644 --- a/routers/api/packages/README.md +++ b/routers/api/packages/README.md @@ -19,7 +19,7 @@ The package registry code is divided into multiple modules to split the function ## Models -Every package registry implementation uses the same underlaying models: +Every package registry implementation uses the same underlying models: | Model | Description | | - | - | diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index 0e11acc901fb4..433cce3b87dbd 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -784,7 +784,7 @@ func SearchTeam(ctx *context.APIContext) { ListOptions: listOptions, } - // Only admin is allowd to search for all teams + // Only admin is allowed to search for all teams if !ctx.Doer.IsAdmin { opts.UserID = ctx.Doer.ID } diff --git a/routers/api/v1/repo/git_ref.go b/routers/api/v1/repo/git_ref.go index 34d2dcfcc8143..b476f6b9401d1 100644 --- a/routers/api/v1/repo/git_ref.go +++ b/routers/api/v1/repo/git_ref.go @@ -33,7 +33,7 @@ func GetGitAllRefs(ctx *context.APIContext) { // required: true // responses: // "200": - // # "$ref": "#/responses/Reference" TODO: swagger doesnt support different output formats by ref + // # "$ref": "#/responses/Reference" TODO: swagger doesn't support different output formats by ref // "$ref": "#/responses/ReferenceList" // "404": // "$ref": "#/responses/notFound" @@ -66,7 +66,7 @@ func GetGitRefs(ctx *context.APIContext) { // required: true // responses: // "200": - // # "$ref": "#/responses/Reference" TODO: swagger doesnt support different output formats by ref + // # "$ref": "#/responses/Reference" TODO: swagger doesn't support different output formats by ref // "$ref": "#/responses/ReferenceList" // "404": // "$ref": "#/responses/notFound" diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index 8a61fc9834518..23066a83ba071 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -401,8 +401,8 @@ func ListIssues(ctx *context.APIContext) { } } - if splitted := strings.Split(ctx.FormString("labels"), ","); len(splitted) > 0 { - labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx.Repo.Repository.ID, splitted) + if split := strings.Split(ctx.FormString("labels"), ","); len(split) > 0 { + labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx.Repo.Repository.ID, split) if err != nil { ctx.Error(http.StatusInternalServerError, "GetLabelIDsInRepoByNames", err) return diff --git a/routers/api/v1/repo/issue_subscription.go b/routers/api/v1/repo/issue_subscription.go index 5a05471264653..05b2aa0b0e420 100644 --- a/routers/api/v1/repo/issue_subscription.go +++ b/routers/api/v1/repo/issue_subscription.go @@ -138,7 +138,7 @@ func setIssueSubscription(ctx *context.APIContext, watch bool) { return } - // If watch state wont change + // If watch state won't change if current == watch { ctx.Status(http.StatusOK) return diff --git a/routers/private/hook_pre_receive.go b/routers/private/hook_pre_receive.go index 4399e49851871..25dd60997d317 100644 --- a/routers/private/hook_pre_receive.go +++ b/routers/private/hook_pre_receive.go @@ -359,7 +359,7 @@ func preReceiveBranch(ctx *preReceiveContext, oldCommitID, newCommitID string, r }) return } - log.Error("Unable to check if mergable: protected branch %s in %-v and pr #%d. Error: %v", ctx.opts.UserID, branchName, repo, pr.Index, err) + log.Error("Unable to check if mergeable: protected branch %s in %-v and pr #%d. Error: %v", ctx.opts.UserID, branchName, repo, pr.Index, err) ctx.JSON(http.StatusInternalServerError, private.Response{ Err: fmt.Sprintf("Unable to get status of pull request %d. Error: %v", ctx.opts.PullRequestID, err), }) diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index abb1f6b66b979..943587eca1c1c 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -146,7 +146,7 @@ func ViewPost(ctx *context_module.Context) { resp.State.Run.CanApprove = run.NeedApproval && ctx.Repo.CanWrite(unit.TypeActions) resp.State.Run.CanRerun = run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions) resp.State.Run.Done = run.Status.IsDone() - resp.State.Run.Jobs = make([]*ViewJob, 0, len(jobs)) // marshal to '[]' instead fo 'null' in json + resp.State.Run.Jobs = make([]*ViewJob, 0, len(jobs)) // marshal to '[]' instead of 'null' in json resp.State.Run.Status = run.Status.String() for _, v := range jobs { resp.State.Run.Jobs = append(resp.State.Run.Jobs, &ViewJob{ @@ -195,8 +195,8 @@ func ViewPost(ctx *context_module.Context) { if run.NeedApproval { resp.State.CurrentJob.Detail = ctx.Locale.Tr("actions.need_approval_desc") } - resp.State.CurrentJob.Steps = make([]*ViewJobStep, 0) // marshal to '[]' instead fo 'null' in json - resp.Logs.StepsLog = make([]*ViewStepLog, 0) // marshal to '[]' instead fo 'null' in json + resp.State.CurrentJob.Steps = make([]*ViewJobStep, 0) // marshal to '[]' instead of 'null' in json + resp.Logs.StepsLog = make([]*ViewStepLog, 0) // marshal to '[]' instead of 'null' in json if task != nil { steps := actions.FullSteps(task) @@ -215,7 +215,7 @@ func ViewPost(ctx *context_module.Context) { step := steps[cursor.Step] - logLines := make([]*ViewStepLogLine, 0) // marshal to '[]' instead fo 'null' in json + logLines := make([]*ViewStepLogLine, 0) // marshal to '[]' instead of 'null' in json index := step.LogIndex + cursor.Cursor validCursor := cursor.Cursor >= 0 && diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index 4ceb52d03994a..829b3d38b4895 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -815,7 +815,7 @@ func CompareDiff(ctx *context.Context) { // applicable if you have one commit to compare and that commit has a message. // In that case the commit message will be prepend to the template body. if templateContent, ok := ctx.Data[pullRequestTemplateKey].(string); ok && templateContent != "" { - // Re-use the same key as that's priortized over the "content" key. + // Reuse the same key as that's priortized over the "content" key. // Add two new lines between the content to ensure there's always at least // one empty line between them. ctx.Data[pullRequestTemplateKey] = content + "\n\n" + templateContent diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index f243507c3347b..a6c6c1e5004a3 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -1661,8 +1661,8 @@ func ViewIssue(ctx *context.Context) { // drop error since times could be pruned from DB.. _ = comment.LoadTime() if comment.Content != "" { - // Content before v1.21 did store the formated string instead of seconds, - // so "|" is used as delimeter to mark the new format + // Content before v1.21 did store the formatted string instead of seconds, + // so "|" is used as delimiter to mark the new format if comment.Content[0] != '|' { // handle old time comments that have formatted text stored comment.RenderedContent = comment.Content @@ -2631,8 +2631,8 @@ func ListIssues(ctx *context.Context) { } } - if splitted := strings.Split(ctx.FormString("labels"), ","); len(splitted) > 0 { - labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx.Repo.Repository.ID, splitted) + if split := strings.Split(ctx.FormString("labels"), ","); len(split) > 0 { + labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx.Repo.Repository.ID, split) if err != nil { ctx.Error(http.StatusInternalServerError, err.Error()) return diff --git a/services/asymkey/sign.go b/services/asymkey/sign.go index 252277e1bcd64..60e035f5e112d 100644 --- a/services/asymkey/sign.go +++ b/services/asymkey/sign.go @@ -73,7 +73,7 @@ type ErrWontSign struct { } func (e *ErrWontSign) Error() string { - return fmt.Sprintf("wont sign: %s", e.Reason) + return fmt.Sprintf("won't sign: %s", e.Reason) } // IsErrWontSign checks if an error is a ErrWontSign diff --git a/services/convert/issue_comment.go b/services/convert/issue_comment.go index 1308051e7c10b..657ec791331c8 100644 --- a/services/convert/issue_comment.go +++ b/services/convert/issue_comment.go @@ -72,8 +72,8 @@ func ToTimelineComment(ctx context.Context, repo *repo_model.Repository, c *issu c.Type == issues_model.CommentTypeStopTracking || c.Type == issues_model.CommentTypeDeleteTimeManual) && c.Content[0] == '|' { - // TimeTracking Comments from v1.21 on store the seconds instead of an formated string - // so we check for the "|" delimeter and convert new to legacy format on demand + // TimeTracking Comments from v1.21 on store the seconds instead of an formatted string + // so we check for the "|" delimiter and convert new to legacy format on demand c.Content = util.SecToTime(c.Content[1:]) } } diff --git a/services/migrations/github.go b/services/migrations/github.go index f27c1a34dafb4..cc4f01c7eed74 100644 --- a/services/migrations/github.go +++ b/services/migrations/github.go @@ -305,7 +305,7 @@ func (g *GithubDownloaderV3) GetLabels() ([]*base.Label, error) { } func (g *GithubDownloaderV3) convertGithubRelease(rel *github.RepositoryRelease) *base.Release { - // GitHub allows commitish to be a reference. + // GitHub allows committish to be a reference. // In this case, we need to remove the prefix, i.e. convert "refs/heads/main" to "main". targetCommitish := strings.TrimPrefix(rel.GetTargetCommitish(), git.BranchPrefix) diff --git a/services/pull/check.go b/services/pull/check.go index ec898201bb66a..9225361c0e86d 100644 --- a/services/pull/check.go +++ b/services/pull/check.go @@ -65,7 +65,7 @@ const ( MergeCheckTypeAuto // Auto Merge (Scheduled Merge) After Checks Succeed ) -// CheckPullMergable check if the pull mergable based on all conditions (branch protection, merge options, ...) +// CheckPullMergable check if the pull mergeable based on all conditions (branch protection, merge options, ...) func CheckPullMergable(stdCtx context.Context, doer *user_model.User, perm *access_model.Permission, pr *issues_model.PullRequest, mergeCheckType MergeCheckType, adminSkipProtectionCheck bool) error { return db.WithTx(stdCtx, func(ctx context.Context) error { if pr.HasMerged { diff --git a/services/pull/merge_merge.go b/services/pull/merge_merge.go index 0f7664297aa81..0c37d58f9775e 100644 --- a/services/pull/merge_merge.go +++ b/services/pull/merge_merge.go @@ -9,7 +9,7 @@ import ( "code.gitea.io/gitea/modules/log" ) -// doMergeStyleMerge merges the tracking into the current HEAD - which is assumed to tbe staging branch (equal to the pr.BaseBranch) +// doMergeStyleMerge merges the tracking into the current HEAD - which is assumed to the staging branch (equal to the pr.BaseBranch) func doMergeStyleMerge(ctx *mergeContext, message string) error { cmd := git.NewCommand(ctx, "merge", "--no-ff", "--no-commit").AddDynamicArguments(trackingBranch) if err := runMergeCommand(ctx, repo_model.MergeStyleMerge, cmd); err != nil { diff --git a/services/pull/pull.go b/services/pull/pull.go index 3c6caec8825a8..0acbfe437dd97 100644 --- a/services/pull/pull.go +++ b/services/pull/pull.go @@ -785,7 +785,7 @@ func GetIssuesAllCommitStatus(ctx context.Context, issues issues_model.IssueList statuses, lastStatus, err := getAllCommitStatus(gitRepo, issue.PullRequest) if err != nil { - log.Error("getAllCommitStatus: cant get commit statuses of pull [%d]: %v", issue.PullRequest.ID, err) + log.Error("getAllCommitStatus: can't get commit statuses of pull [%d]: %v", issue.PullRequest.ID, err) continue } res[issue.PullRequest.ID] = statuses diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index 4ec2fd557c76a..b092c168bef92 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -1,7 +1,7 @@ {{/* Attributes: * root * ContainerClasses -* (TODO: search "branch_dropdown" in the template direcotry) +* (TODO: search "branch_dropdown" in the template directory) */}} {{$defaultBranch := $.root.BranchName}} {{if and .root.IsViewTag (not .noTag)}} diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index dab6ef3de6529..0eaf9ff8f9bdf 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -28,7 +28,7 @@
-
+
{{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.locale}} {{if .IsClosed}} {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 5dbd530fa560b..569f99d8d1a17 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -382,7 +382,7 @@
{{if .OriginalAuthor}} {{else}} - {{/* Some timeline avatars need a offset to correctly allign with their speech + {{/* Some timeline avatars need a offset to correctly align with their speech bubble. The condition depends on review type and for positive reviews whether there is a comment element or not */}} diff --git a/tests/integration/README.md b/tests/integration/README.md index f4e0061314668..2130fa56afea0 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -23,7 +23,7 @@ make clean build act_runner exec -W ./.github/workflows/pull-db-tests.yml --event=pull_request --default-actions-url="https://github.com" -i catthehacker/ubuntu:runner-latest ``` -Warning: This file defines many jobs, so it will be resource-intensive and therefor not recommended. +Warning: This file defines many jobs, so it will be resource-intensive and therefore not recommended. ### Run single job diff --git a/tests/integration/api_packages_maven_test.go b/tests/integration/api_packages_maven_test.go index 81112f305a62e..fb147ef4517ac 100644 --- a/tests/integration/api_packages_maven_test.go +++ b/tests/integration/api_packages_maven_test.go @@ -107,7 +107,7 @@ func TestPackageMaven(t *testing.T) { t.Run("UploadVerifySHA1", func(t *testing.T) { defer tests.PrintCurrentTest(t)() - t.Run("Missmatch", func(t *testing.T) { + t.Run("Mismatch", func(t *testing.T) { defer tests.PrintCurrentTest(t)() putFile(t, fmt.Sprintf("/%s/%s.sha1", packageVersion, filename), "test", http.StatusBadRequest) diff --git a/tests/integration/api_user_org_perm_test.go b/tests/integration/api_user_org_perm_test.go index 40870f39ff437..e3f57259920ab 100644 --- a/tests/integration/api_user_org_perm_test.go +++ b/tests/integration/api_user_org_perm_test.go @@ -128,12 +128,12 @@ func TestUnknowUser(t *testing.T) { session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadUser, auth_model.AccessTokenScopeReadOrganization) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/users/unknow/orgs/org25/permissions?token=%s", token)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/users/unknown/orgs/org25/permissions?token=%s", token)) resp := MakeRequest(t, req, http.StatusNotFound) var apiError api.APIError DecodeJSON(t, resp, &apiError) - assert.Equal(t, "user redirect does not exist [name: unknow]", apiError.Message) + assert.Equal(t, "user redirect does not exist [name: unknown]", apiError.Message) } func TestUnknowOrganization(t *testing.T) { @@ -142,7 +142,7 @@ func TestUnknowOrganization(t *testing.T) { session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadUser, auth_model.AccessTokenScopeReadOrganization) - req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/users/user1/orgs/unknow/permissions?token=%s", token)) + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/users/user1/orgs/unknown/permissions?token=%s", token)) resp := MakeRequest(t, req, http.StatusNotFound) var apiError api.APIError DecodeJSON(t, resp, &apiError) diff --git a/tests/integration/compare_test.go b/tests/integration/compare_test.go index 509524ca5627c..27b2920cc16ee 100644 --- a/tests/integration/compare_test.go +++ b/tests/integration/compare_test.go @@ -67,7 +67,7 @@ func TestCompareBranches(t *testing.T) { session := loginUser(t, "user2") - // Inderect compare remove-files-b (head) with add-csv (base) branch + // Indirect compare remove-files-b (head) with add-csv (base) branch // // 'link_hi' and 'test.csv' are deleted, 'test.txt' is added req := NewRequest(t, "GET", "/user2/repo20/compare/add-csv...remove-files-b") @@ -79,7 +79,7 @@ func TestCompareBranches(t *testing.T) { inspectCompare(t, htmlDoc, diffCount, diffChanges) - // Inderect compare remove-files-b (head) with remove-files-a (base) branch + // Indirect compare remove-files-b (head) with remove-files-a (base) branch // // 'link_hi' and 'test.csv' are deleted, 'test.txt' is added @@ -92,7 +92,7 @@ func TestCompareBranches(t *testing.T) { inspectCompare(t, htmlDoc, diffCount, diffChanges) - // Inderect compare remove-files-a (head) with remove-files-b (base) branch + // Indirect compare remove-files-a (head) with remove-files-b (base) branch // // 'link_hi' and 'test.csv' are deleted diff --git a/web_src/fomantic/build/semantic.js b/web_src/fomantic/build/semantic.js index 6304c6faf49e4..565b4e091c046 100644 --- a/web_src/fomantic/build/semantic.js +++ b/web_src/fomantic/build/semantic.js @@ -142,7 +142,7 @@ $.api = $.fn.api = function(parameters) { response = JSON.parse(response); } catch(e) { - // isnt json string + // isn't json string } } return response; @@ -344,7 +344,7 @@ $.api = $.fn.api = function(parameters) { cancelled: function() { return (module.cancelled || false); }, - succesful: function() { + successful: function() { module.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'); return module.was.successful(); }, @@ -2220,7 +2220,7 @@ $.fn.dimmer = function(parameters) { event: { click: function(event) { - module.verbose('Determining if event occured on dimmer', event); + module.verbose('Determining if event occurred on dimmer', event); if( $dimmer.find(event.target).length === 0 || $(event.target).is(selector.content) ) { module.hide(); event.stopImmediatePropagation(); @@ -3368,7 +3368,7 @@ $.fn.dropdown = function(parameters) { if(settings.onHide.call(element) !== false) { module.animate.hide(function() { module.remove.visible(); - // hidding search focus + // hiding search focus if ( module.is.focusedOnSearch() && preventBlur !== true ) { $search.blur(); } @@ -14461,7 +14461,7 @@ $.fn.transition.settings = { // possible errors error: { - noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.', + noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.', repeated : 'That animation is already occurring, cancelling repeated animation', method : 'The method you called is not defined', support : 'This browser does not support CSS animations' diff --git a/web_src/js/utils/color.js b/web_src/js/utils/color.js index 5d9c4ca45dfd2..a372fa6c5e1c5 100644 --- a/web_src/js/utils/color.js +++ b/web_src/js/utils/color.js @@ -1,5 +1,5 @@ // Check similar implementation in modules/util/color.go and keep synchronization -// Return R, G, B values defined in reletive luminance +// Return R, G, B values defined in relative luminance function getLuminanceRGB(channel) { const sRGB = channel / 255; return (sRGB <= 0.03928) ? sRGB / 12.92 : ((sRGB + 0.055) / 1.055) ** 2.4;