mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
Add codespell support and fix a good number of typos with its help (#3270)
More about codespell: https://github.com/codespell-project/codespell . I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback. ``` ❯ grep lint-spell Makefile @echo " - lint-spell lint spelling" @echo " - lint-spell-fix lint spelling and fix issues" lint: lint-frontend lint-backend lint-spell lint-fix: lint-frontend-fix lint-backend-fix lint-spell-fix .PHONY: lint-spell lint-spell: lint-codespell .PHONY: lint-spell-fix lint-spell-fix: lint-codespell-fix ❯ git grep lint- -- .forgejo/ .forgejo/workflows/testing.yml: - run: make --always-make -j$(nproc) lint-backend checks-backend # ensure the "go-licenses" make target runs .forgejo/workflows/testing.yml: - run: make lint-frontend ``` so how would you like me to invoke `lint-codespell` on CI? (without that would be IMHO very suboptimal and let typos sneak in) Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3270 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Yaroslav Halchenko <debian@onerussian.com> Co-committed-by: Yaroslav Halchenko <debian@onerussian.com>
This commit is contained in:
parent
06843c1cdc
commit
2b2fd2728c
80 changed files with 183 additions and 136 deletions
19
Makefile
19
Makefile
|
@ -223,6 +223,9 @@ help:
|
|||
@echo " - lint-frontend-fix lint frontend files and fix issues"
|
||||
@echo " - lint-backend lint backend files"
|
||||
@echo " - lint-backend-fix lint backend files and fix issues"
|
||||
@echo " - lint-codespell lint typos"
|
||||
@echo " - lint-codespell-fix lint typos and fix them automatically"
|
||||
@echo " - lint-codespell-fix-i lint typos and fix them interactively"
|
||||
@echo " - lint-go lint go files"
|
||||
@echo " - lint-go-fix lint go files and fix issues"
|
||||
@echo " - lint-go-vet lint go files with vet"
|
||||
|
@ -398,6 +401,18 @@ lint-backend: lint-go lint-go-vet lint-editorconfig
|
|||
.PHONY: lint-backend-fix
|
||||
lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
|
||||
|
||||
.PHONY: lint-codespell
|
||||
lint-codespell:
|
||||
codespell
|
||||
|
||||
.PHONY: lint-codespell-fix
|
||||
lint-codespell-fix:
|
||||
codespell -w
|
||||
|
||||
.PHONY: lint-codespell-fix-i
|
||||
lint-codespell-fix-i:
|
||||
codespell -w -i 3 -C 2
|
||||
|
||||
.PHONY: lint-js
|
||||
lint-js: node_modules
|
||||
npx eslint --color --max-warnings=0 --ext js,vue $(ESLINT_FILES)
|
||||
|
@ -423,11 +438,11 @@ lint-md: node_modules
|
|||
npx markdownlint docs *.md
|
||||
|
||||
.PHONY: lint-spell
|
||||
lint-spell:
|
||||
lint-spell: lint-codespell
|
||||
@go run $(MISSPELL_PACKAGE) -error $(SPELLCHECK_FILES)
|
||||
|
||||
.PHONY: lint-spell-fix
|
||||
lint-spell-fix:
|
||||
lint-spell-fix: lint-codespell-fix
|
||||
@go run $(MISSPELL_PACKAGE) -w $(SPELLCHECK_FILES)
|
||||
|
||||
.PHONY: lint-go
|
||||
|
|
|
@ -512,7 +512,7 @@ This stable release contains a single bug fix for a regression introduced in v1.
|
|||
|
||||
## 1.21.11-0
|
||||
|
||||
[The complete list of new commits included in the Forgejo v1.21.11-0 release can be reviewed here](https://codeberg.org/forgejo/forgejo/compare/v1.21.10-0...v1.21.11-0), or from the comand line with:
|
||||
[The complete list of new commits included in the Forgejo v1.21.11-0 release can be reviewed here](https://codeberg.org/forgejo/forgejo/compare/v1.21.10-0...v1.21.11-0), or from the command line with:
|
||||
|
||||
```shell
|
||||
$ git clone https://codeberg.org/forgejo/forgejo
|
||||
|
@ -580,7 +580,7 @@ Note that there is no `Forgejo v1.21.9-0` release. The release numbering of the
|
|||
* [Fix paths when finding files via the web interface that were not escaped](https://codeberg.org/forgejo/forgejo/commit/b22be0c03fa4814c1b8b892346de5d4547782ce7).
|
||||
* [Respect `DEFAULT_ORG_MEMBER_VISIBLE` setting when adding creator to org](https://codeberg.org/forgejo/forgejo/commit/5e5574c7b328e2c500d497517047b8d1fd0ca478).
|
||||
* [Fix duplicate migrated milestones](https://codeberg.org/forgejo/forgejo/commit/706ff7aa9fcfe4c43893dc12e27d064064e80635).
|
||||
* [Fix inline math blocks can't be preceeded/followed by alphanumerical characters](https://codeberg.org/forgejo/forgejo/commit/0d3f446460b22a29c259e7d42ed89f90fd216ca7).
|
||||
* [Fix inline math blocks can't be preceded/followed by alphanumerical characters](https://codeberg.org/forgejo/forgejo/commit/0d3f446460b22a29c259e7d42ed89f90fd216ca7).
|
||||
|
||||
## 1.21.8-0
|
||||
|
||||
|
@ -687,7 +687,7 @@ This stable release contains bug fixes and a **security fix**, as explained in t
|
|||
* [Fix push to create with capitalize repo name](https://codeberg.org/forgejo/forgejo/commit/8782275c9c66ad6fc7c44503d7df9dae7196aa65).
|
||||
* In Markdown [don't try to make the link absolute if the link has a schema that's defined in `[markdown].CUSTOM_URL_SCHEMES`](https://codeberg.org/forgejo/forgejo/commit/6c100083c29fb0ccf0cc52e8767e540a260d9468), because they can't be made absolute.
|
||||
* [Fix Ctrl+Enter on submitting review comment](https://codeberg.org/forgejo/forgejo/commit/1c3a31d85112d10fb948d6f0b763191ed6f68e90).
|
||||
* In Git version v2.43.1, the behavior of `GIT_FLUSH` was accidentially flipped. This causes Forgejo to hang on the `check-attr` command, because no output was being flushed. [Workaround this by detecting if Git v2.43.1 is used and set `GIT_FLUSH=0` thus getting the correct behavior](https://codeberg.org/forgejo/forgejo/commit/ff468ab5e426582b068586ce13d5a5348365e783).
|
||||
* In Git version v2.43.1, the behavior of `GIT_FLUSH` was accidentally flipped. This causes Forgejo to hang on the `check-attr` command, because no output was being flushed. [Workaround this by detecting if Git v2.43.1 is used and set `GIT_FLUSH=0` thus getting the correct behavior](https://codeberg.org/forgejo/forgejo/commit/ff468ab5e426582b068586ce13d5a5348365e783).
|
||||
* [When setting `url.host` on a URL object with no port specified (like is the case of default port), the resulting URL's port will not change. Workaround this quirk in the URL standard by explicitly setting port for the http and https protocols](https://codeberg.org/forgejo/forgejo/commit/628e1036cfbcfae442cb6494249fe11410447056).
|
||||
* [Fix elasticsearch Request Entity Too Large](https://codeberg.org/forgejo/forgejo/commit/e6f59f6e1489d63d53de0da1de406a7a71a82adb).
|
||||
* [Do not send update/delete release notifications when it is in a draft state](https://codeberg.org/forgejo/forgejo/commit/3c54a1dbf62e56d948feb1008512900140033737).
|
||||
|
@ -777,7 +777,7 @@ This stable release includes security and bug fixes as well as documentation imp
|
|||
* [Gracefully handle missing branches](https://codeberg.org/forgejo/forgejo/commit/c2fa9c308f5cdb08dd84fb8ec6623a57e75d5152) when a branch is missing from Git but still lingering in the database.
|
||||
* [Fix panic in `canSoftDeleteContentHistory`](https://codeberg.org/forgejo/forgejo/commit/ab1ccc55dca7fd05e59a01343e6dfe53be6195d0)
|
||||
* [Check for Commit in opengraph](https://codeberg.org/forgejo/forgejo/commit/b473a44a2bb59591f3e24bfcdeed1d8fbb0f9204)
|
||||
* [Handle non-existant commit in Archive request](https://codeberg.org/forgejo/forgejo/commit/0fbf761d1930f9336be6da8d17ae6032203a9381)
|
||||
* [Handle non-existent commit in Archive request](https://codeberg.org/forgejo/forgejo/commit/0fbf761d1930f9336be6da8d17ae6032203a9381)
|
||||
* [Fix NPE in `ToPullReviewList`](https://codeberg.org/forgejo/forgejo/commit/f5349b66b78968301d7dc4c45e8e08b46910aa6e)
|
||||
* [Fix URL in the mail to include the host](https://codeberg.org/forgejo/forgejo/commit/ac889d42903b2ce2129a02ace620a10a6f940920)
|
||||
* [Fix the event of a scheduled action](https://codeberg.org/forgejo/forgejo/commit/892a8e1f4a5cc09cc3136e0b0e6487c154c5ed2b) to be "schedule" instead of a semi-random event from the default branch.
|
||||
|
@ -888,7 +888,7 @@ $ git clone https://codeberg.org/forgejo/forgejo/
|
|||
$ git -C forgejo log --oneline --no-merges v1.21.1-0..v1.21.2-0
|
||||
```
|
||||
|
||||
This stable release includes bug fixes. It was built with Go v1.21.5 that fixes [CVE-2023-39326](https://groups.google.com/g/golang-announce/c/iLGK3x6yuNo) which a malicious HTTP client can exploit to cause a server to automatically read a large amount of data. It allows for memory exhaustion in the situation that HTTP chuncked encoding requests can reach Forgejo.
|
||||
This stable release includes bug fixes. It was built with Go v1.21.5 that fixes [CVE-2023-39326](https://groups.google.com/g/golang-announce/c/iLGK3x6yuNo) which a malicious HTTP client can exploit to cause a server to automatically read a large amount of data. It allows for memory exhaustion in the situation that HTTP chunked encoding requests can reach Forgejo.
|
||||
|
||||
* Recommended Action
|
||||
|
||||
|
@ -953,7 +953,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.20/forgejo..origin/v1.21/fo
|
|||
- [Add](https://codeberg.org/forgejo/forgejo/commit/0d55f64e6cd3de2e1e5c0ee795605823efb14231) support for [recurring actions similar to cron jobs](https://forgejo.org/docs/v1.21/user/actions/#onschedule).
|
||||
- [Add](https://codeberg.org/forgejo/forgejo/commit/19872063a3c14256a1d89b2a104d63e7538a3a28) the possibility to [disable workflows from the user interface](https://forgejo.org/docs/v1.21/user/actions/#list-of-runners-and-their-tasks).
|
||||
- [Add](https://codeberg.org/forgejo/forgejo/commit/460a2b0edffe71d9e64633beaa1071fcf4a33369) automatic [cleanup of artificats](https://forgejo.org/docs/v1.21/user/actions/#artifacts).
|
||||
- [Add](https://codeberg.org/forgejo/forgejo/commit/44781f9f5c4ede618660d8cfe42437f0e8dc22a0) automatic cancelation [of jobs when pushing new commits](https://forgejo.org/docs/v1.21/user/actions/#auto-cancelation-of-workflows) to a PR.
|
||||
- [Add](https://codeberg.org/forgejo/forgejo/commit/44781f9f5c4ede618660d8cfe42437f0e8dc22a0) automatic cancellation [of jobs when pushing new commits](https://forgejo.org/docs/v1.21/user/actions/#auto-cancellation-of-workflows) to a PR.
|
||||
- [Add](https://codeberg.org/forgejo/forgejo/commit/f3d293d2bbe0b2eab047bdd403046069cffbc0c4) support for [uploading multiple artificats](https://forgejo.org/docs/v1.21/user/actions/#artifacts).
|
||||
- [Add](https://codeberg.org/forgejo/forgejo/commit/48e5a74f215d78813a816c57fc5a85a909a003d5) support for the [`pull_request_target` event](https://forgejo.org/docs/v1.21/user/actions/#onpull_request_target) which has access to secrets because it runs using the workflows from the base branch instead of the pull request.
|
||||
- [Add](https://codeberg.org/forgejo/forgejo/commit/8228751c55d6a4263f0fec2932ca16181c09c97d) support for reading labels from the runner [instead of specifying them during registration](https://forgejo.org/docs/v1.21/admin/actions/#registration).
|
||||
|
@ -1268,7 +1268,7 @@ this situation, [follow the instructions in the companion blog post](https://for
|
|||
* [The CLI exit code now is different from zero when an error occurs](https://codeberg.org/forgejo/forgejo/commit/089af9ab1)
|
||||
* [Fix error when a Debian package has a double newline character at the end of the control block](https://codeberg.org/forgejo/forgejo/commit/dd7180846)
|
||||
* [Fix a condition that would cause git related tasks to hang for longer than necessary in the queues and use too many resources as a result](https://codeberg.org/forgejo/forgejo/commit/36f8fbe1b)
|
||||
* [Fix the topic validation rule and suport dots](https://codeberg.org/forgejo/forgejo/commit/a578b75d7)
|
||||
* [Fix the topic validation rule and support dots](https://codeberg.org/forgejo/forgejo/commit/a578b75d7)
|
||||
* [Fix pull request check list when there are more than 30](https://codeberg.org/forgejo/forgejo/commit/e226b9646)
|
||||
* [Fix attachment clipboard copy on insecure origin](https://codeberg.org/forgejo/forgejo/commit/12ac84c26)
|
||||
* [Fix the profile README rendering](https://codeberg.org/forgejo/forgejo/commit/84c3b60a4) that [was inconsistent with other markdown files renderings](https://codeberg.org/forgejo/forgejo/issues/833)
|
||||
|
@ -1297,7 +1297,7 @@ This stable release includes bug fixes and displays [warnings in the administrat
|
|||
|
||||
The most prominent ones are described here, others can be found in the list of commits included in the release as described above.
|
||||
|
||||
* [Add missing assets to the Forgejo sources tarbal](https://codeberg.org/forgejo/forgejo/commit/e14d239005)
|
||||
* [Add missing assets to the Forgejo sources tarball](https://codeberg.org/forgejo/forgejo/commit/e14d239005)
|
||||
* [Fix user type selection error when creating a user](https://codeberg.org/forgejo/forgejo/commit/268569b462) and selecting `public` or `private`.
|
||||
* [Fix access check for org-level project](https://codeberg.org/forgejo/forgejo/commit/5afb0294f4)
|
||||
* [Warn instead of reporting an error when a webhook cannot be found](https://codeberg.org/forgejo/forgejo/commit/4c3dcdf815)
|
||||
|
@ -1352,7 +1352,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.19/forgejo..origin/v1.20/fo
|
|||
- The storage settings were [refactored](https://codeberg.org/forgejo/forgejo/commit/d6dd6d641b593c54fe1a1041c153111ce81dbc20). Read more about [storage settings](https://forgejo.org/docs/v1.20/admin/storage/).
|
||||
- [The [repository.editor] PREVIEWABLE_FILE_MODES setting was removed](https://codeberg.org/forgejo/forgejo/commit/84daddc2fa74393cdc13371b0cc44f0444cfdae0). This setting served no practical purpose and was not working correctly. Instead a preview tab is always shown in the file editor when supported.
|
||||
- In addition to the already deprecated options inside [queue], many options have been dropped as well. Those are WRAP_IF_NECESSARY, MAX_ATTEMPTS, TIMEOUT, WORKERS, BLOCK_TIMEOUT, BOOST_TIMEOUT, BOOST_WORKERS. You can remove them from your app.ini now. Additionally, some default values have changed in this section.
|
||||
- The default CSS and templates included in Forgejo were heavily refactored and a large number of variables renamed. These changes are not documented and there is a very high chance that a tempate extracted and modified for a particular Forgejo instance will no longer work as it did. Browsing through the git history of the template in the sources is the best way to figure out how and why it was modified.
|
||||
- The default CSS and templates included in Forgejo were heavily refactored and a large number of variables renamed. These changes are not documented and there is a very high chance that a template extracted and modified for a particular Forgejo instance will no longer work as it did. Browsing through the git history of the template in the sources is the best way to figure out how and why it was modified.
|
||||
- **Moderation:**
|
||||
Blocking another user is desirable if they are acting maliciously or are spamming your repository. When you block a user, Forgejo does not explicitly notify them, but they may learn through an interaction with you that is blocked. [Read more about blocking users](https://forgejo.org/docs/v1.20/user/blocking-user/).
|
||||
- **Package:**
|
||||
|
@ -1360,7 +1360,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.19/forgejo..origin/v1.20/fo
|
|||
- **Accessibility:**
|
||||
numerous improvements for [issue comments](https://codeberg.org/forgejo/forgejo/commit/6c354546547cd3a9595a7db119a6480d9cd506a7), [the menu on the navbar](https://codeberg.org/forgejo/forgejo/commit/a78e0b7dade16bc6509b943fe86e74962f1b95b6), [scoped labels](https://codeberg.org/forgejo/forgejo/commit/e8935606f5f1fff3c59222ebca6d4615ab06fb0b), [checkboxes and dropdowns](https://codeberg.org/forgejo/forgejo/commit/d4f35bd681af0632da988e15306f330e020422b2), [RTL rendering support to Markdown](https://codeberg.org/forgejo/forgejo/commit/32d9c47ec7706d8f06e09b42e09a28d7a0e3c526), [file (re-)views](https://codeberg.org/forgejo/forgejo/commit/e95b42e187cde9ac4bd541cd714bdb4f5c1fd8bc), [interactive tooltips](https://codeberg.org/forgejo/forgejo/commit/87f0f7e670c6c0e6aeab8c4458bfdb9d954eacec), [using a button element](https://codeberg.org/forgejo/forgejo/commit/81fe5d61851c0e586af7d32c29171ceff9a571bb), [repository list](https://codeberg.org/forgejo/forgejo/commit/e82f1b15c7120ad13fd3b67cf7e2c6cb9915c22d) and more.
|
||||
- **Time:**
|
||||
The display and localization of time was improved for [tooltips](https://codeberg.org/forgejo/forgejo/commit/b7b58348317cbe0145dc453d45c886b8e2764b4c), [milestones](https://codeberg.org/forgejo/forgejo/commit/97176754beb4de23fa0f68df715c4737919c93b0), [due date and translations that contain dates](https://codeberg.org/forgejo/forgejo/commit/70bb4984cdad9a15d676708bd345b590aa42d72a), [commit graphs](https://codeberg.org/forgejo/forgejo/commit/5bc9f7fcf9aece92c3fa2a0ea56e5585261a7f28), [runners](https://codeberg.org/forgejo/forgejo/commit/62ca5825f73ad5a25ffeb6c3ef66f0eaf5d30cdf), [webhooks](https://codeberg.org/forgejo/forgejo/commit/dbb37367854d108ebfffcac27837c0afac199a8e), [tests](https://codeberg.org/forgejo/forgejo/commit/3d266dd0f3dbae7e417c0e790e266aebc0078814) and more. Previously each rendered timestamp would be static, now the real time since an event happend is show. If a comment was added 2 minutes before the page rendered it would show as "2 minutes ago" on the initial render and if another 8 minutes have passed, without a page refresh you'd see "10 minutes ago".
|
||||
The display and localization of time was improved for [tooltips](https://codeberg.org/forgejo/forgejo/commit/b7b58348317cbe0145dc453d45c886b8e2764b4c), [milestones](https://codeberg.org/forgejo/forgejo/commit/97176754beb4de23fa0f68df715c4737919c93b0), [due date and translations that contain dates](https://codeberg.org/forgejo/forgejo/commit/70bb4984cdad9a15d676708bd345b590aa42d72a), [commit graphs](https://codeberg.org/forgejo/forgejo/commit/5bc9f7fcf9aece92c3fa2a0ea56e5585261a7f28), [runners](https://codeberg.org/forgejo/forgejo/commit/62ca5825f73ad5a25ffeb6c3ef66f0eaf5d30cdf), [webhooks](https://codeberg.org/forgejo/forgejo/commit/dbb37367854d108ebfffcac27837c0afac199a8e), [tests](https://codeberg.org/forgejo/forgejo/commit/3d266dd0f3dbae7e417c0e790e266aebc0078814) and more. Previously each rendered timestamp would be static, now the real time since an event happened is show. If a comment was added 2 minutes before the page rendered it would show as "2 minutes ago" on the initial render and if another 8 minutes have passed, without a page refresh you'd see "10 minutes ago".
|
||||
- **[Wiki](https://forgejo.org/docs/v1.20/user/wiki/)**
|
||||
- Improve the [display of the table of content](https://codeberg.org/forgejo/forgejo/commit/1ab16e48cccc086e7f97fb3ae8a293fe47a3a452)
|
||||
- Fixed a bug [preventing team users who have wiki write permission from deleting a page](https://codeberg.org/forgejo/forgejo/commit/284b41f45244bbe46fc8feee15bbfdf66d150e79)
|
||||
|
@ -1701,7 +1701,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.18/forgejo..origin/v1.19/fo
|
|||
|
||||
Forgejo access token, used with the [API](https://forgejo.org/docs/v1.19/admin/api-usage/) can now have a "scope" that limits what it can access. Existing tokens stored in the database and created before Forgejo v1.19 had unlimited access. For backward compatibility, their access will remain the same and they will continue to work as before. However, **newly created token that do not specify a scope will now only have read-only access to public user profile and public repositories**.
|
||||
|
||||
For instance, the `/users/{username}/tokens` API endpoint will require the `scopes: ['all', 'sudo']` parameter and the `forgejo admin user generate-access-token` will require the `--scopes all,sudo` argument obtain tokens with ulimited access as before for admin users.
|
||||
For instance, the `/users/{username}/tokens` API endpoint will require the `scopes: ['all', 'sudo']` parameter and the `forgejo admin user generate-access-token` will require the `--scopes all,sudo` argument obtain tokens with unlimited access as before for admin users.
|
||||
|
||||
[Read more about the scoped tokens](https://forgejo.org/docs/v1.19/user/oauth2-provider/#scoped-tokens).
|
||||
|
||||
|
@ -1818,7 +1818,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.18/forgejo..origin/v1.19/fo
|
|||
|
||||
It appears for the first time in this Forgejo release but is not yet fit for production. It is not fully implemented and may be insecure. However, as long as it is not enabled, it presents no risk to existing Forgejo instances.
|
||||
|
||||
If a repository has a file such as `.forgejo/workflows/test.yml`, it will be interpreted, for instance to run tests and verify the code in the repository works as expected (Continuous Integration). It can also be used to create HTML pages for a website and publish them (Continous Deployment). The syntax is similar to GitHub Actions and the jobs can be controled from the Forgejo web interface.
|
||||
If a repository has a file such as `.forgejo/workflows/test.yml`, it will be interpreted, for instance to run tests and verify the code in the repository works as expected (Continuous Integration). It can also be used to create HTML pages for a website and publish them (Continuous Deployment). The syntax is similar to GitHub Actions and the jobs can be controlled from the Forgejo web interface.
|
||||
|
||||
[Read more about Forgejo Actions](https://forgejo.codeberg.page/2023-02-27-forgejo-actions/)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
|
||||
<p>In general, Your Gitea Instance retains User Personal Information for as long as your account is active, or as needed to provide you service.</p>
|
||||
|
||||
<p>If you would like to cancel your account or delete your User Personal Information, you may do so in your user profile. We retain and use your information as necessary to comply with our legal obligations, resolve disputes, and enforce our agreements, but barring legal requirements, we will delete your full profile (within reason) within 90 days of your request. Feel free to contact our support to request erasure of the data we process on the bassis of consent within 30 days.</p>
|
||||
<p>If you would like to cancel your account or delete your User Personal Information, you may do so in your user profile. We retain and use your information as necessary to comply with our legal obligations, resolve disputes, and enforce our agreements, but barring legal requirements, we will delete your full profile (within reason) within 90 days of your request. Feel free to contact our support to request erasure of the data we process on the basis of consent within 30 days.</p>
|
||||
|
||||
<p>After an account has been deleted, certain data, such as contributions to other Users' repositories and comments in others' issues, will remain. However, we will delete or de-identify your User Personal Information, including your username and email address, from the author field of issues, pull requests, and comments by associating them with a ghost user.</p>
|
||||
|
||||
|
|
|
@ -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"`
|
||||
|
|
|
@ -60,7 +60,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(":"))
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ func TestAuthSession(t *testing.T) {
|
|||
err = auth.DestroySession(db.DefaultContext, key)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Ensure it doens't exists.
|
||||
// Ensure it doesn't exists.
|
||||
ok, err = auth.ExistSession(db.DefaultContext, key)
|
||||
assert.NoError(t, err)
|
||||
assert.False(t, ok)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-
|
||||
id: 1001
|
||||
type: 0 # pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 1001
|
||||
index: 1001
|
||||
head_repo_id: 1
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
repo_id: 1
|
||||
state: "warning"
|
||||
sha: "1234123412341234123412341234123412341234"
|
||||
target_url: https://example.com/converage/
|
||||
target_url: https://example.com/coverage/
|
||||
description: My awesome Coverage service
|
||||
context: cov/awesomeness
|
||||
creator_id: 2
|
||||
|
@ -26,7 +26,7 @@
|
|||
repo_id: 1
|
||||
state: "success"
|
||||
sha: "1234123412341234123412341234123412341234"
|
||||
target_url: https://example.com/converage/
|
||||
target_url: https://example.com/coverage/
|
||||
description: My awesome Coverage service
|
||||
context: cov/awesomeness
|
||||
creator_id: 2
|
||||
|
|
|
@ -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
|
||||
|
@ -16,7 +16,7 @@
|
|||
-
|
||||
id: 2
|
||||
type: 0 # gitea pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 3
|
||||
index: 3
|
||||
head_repo_id: 1
|
||||
|
@ -29,7 +29,7 @@
|
|||
-
|
||||
id: 3
|
||||
type: 0 # gitea pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 8
|
||||
index: 1
|
||||
head_repo_id: 11
|
||||
|
@ -42,7 +42,7 @@
|
|||
-
|
||||
id: 4
|
||||
type: 0 # gitea pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 9
|
||||
index: 1
|
||||
head_repo_id: 48
|
||||
|
@ -55,7 +55,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
|
||||
|
@ -68,7 +68,7 @@
|
|||
-
|
||||
id: 6
|
||||
type: 0 # gitea pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 12
|
||||
index: 2
|
||||
head_repo_id: 3
|
||||
|
@ -81,7 +81,7 @@
|
|||
-
|
||||
id: 7
|
||||
type: 0 # gitea pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 19
|
||||
index: 1
|
||||
head_repo_id: 58
|
||||
|
@ -94,7 +94,7 @@
|
|||
-
|
||||
id: 8
|
||||
type: 0 # gitea pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 20
|
||||
index: 1
|
||||
head_repo_id: 23
|
||||
|
@ -103,7 +103,7 @@
|
|||
-
|
||||
id: 9
|
||||
type: 0 # gitea pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 21
|
||||
index: 1
|
||||
head_repo_id: 60
|
||||
|
@ -112,7 +112,7 @@
|
|||
-
|
||||
id: 10
|
||||
type: 0 # gitea pull request
|
||||
status: 2 # mergable
|
||||
status: 2 # mergeable
|
||||
issue_id: 22
|
||||
index: 1
|
||||
head_repo_id: 61
|
||||
|
|
|
@ -234,7 +234,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",
|
||||
|
|
|
@ -807,7 +807,7 @@ func UpdateAllowEdits(ctx context.Context, pr *PullRequest) error {
|
|||
|
||||
// Mergeable returns if the pullrequest is mergeable.
|
||||
func (pr *PullRequest) Mergeable(ctx context.Context) 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.
|
||||
|
|
|
@ -187,8 +187,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,
|
||||
|
@ -267,8 +267,8 @@ func DeleteIssueUserTimes(ctx context.Context, issue *Issue, user *user_model.Us
|
|||
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 {
|
||||
|
@ -298,8 +298,8 @@ func DeleteTime(ctx context.Context, 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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -36,7 +36,7 @@ func CountArchiveDownload(ctx context.Context, repoID, releaseID int64, tp git.A
|
|||
return nil
|
||||
}
|
||||
|
||||
// The archive does not esxists in the databse, so let's add it
|
||||
// The archive does not esxists in the database, so let's add it
|
||||
newCounter := &RepoArchiveDownloadCount{
|
||||
RepoID: repoID,
|
||||
ReleaseID: releaseID,
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -69,7 +69,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
|
||||
|
||||
```
|
||||
-------------
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -113,7 +113,7 @@ func (ca GitAttribute) Bool() optional.Option[bool] {
|
|||
}
|
||||
|
||||
// gitCheckAttrCommand prepares the "git check-attr" command for later use as one-shot or streaming
|
||||
// instanciation.
|
||||
// instantiation.
|
||||
func (repo *Repository) gitCheckAttrCommand(treeish string, attributes ...string) (*Command, *RunOpts, context.CancelFunc, error) {
|
||||
if len(attributes) == 0 {
|
||||
return nil, nil, nil, fmt.Errorf("no provided attributes to check-attr")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -120,7 +120,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]
|
||||
|
@ -140,12 +140,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] == '"' {
|
||||
|
|
|
@ -27,7 +27,7 @@ import (
|
|||
)
|
||||
|
||||
// IndexerMetadata is used to send data to the queue, so it contains only the ids.
|
||||
// It may look weired, because it has to be compatible with the old queue data format.
|
||||
// It may look weird, because it has to be compatible with the old queue data format.
|
||||
// If the IsDelete flag is true, the IDs specify the issues to delete from the index without querying the database.
|
||||
// If the IsDelete flag is false, the ID specify the issue to index, so Indexer will query the database to get the issue data.
|
||||
// It should be noted that if the id is not existing in the database, it's index will be deleted too even if IsDelete is false.
|
||||
|
|
|
@ -138,7 +138,7 @@ var cases = []*testIndexerCase{
|
|||
{ID: 1002, Comments: []string{"hi", "hello world"}},
|
||||
},
|
||||
SearchOptions: &internal.SearchOptions{
|
||||
Keyword: "hello wrold",
|
||||
Keyword: "hello world",
|
||||
IsFuzzyKeyword: true,
|
||||
},
|
||||
ExpectedIDs: []int64{1002, 1001, 1000},
|
||||
|
|
|
@ -66,7 +66,7 @@ func TestConvertHits(t *testing.T) {
|
|||
"id": float64(11),
|
||||
"title": "a title",
|
||||
"content": "issue body with no match",
|
||||
"comments": []any{"hey whats up?", "I'm currently bowling", "nice"},
|
||||
"comments": []any{"hey what's up?", "I'm currently bowling", "nice"},
|
||||
},
|
||||
map[string]any{
|
||||
"id": float64(22),
|
||||
|
|
|
@ -204,7 +204,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)
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ func (g *GitHubLegacyCalloutTransformer) Transform(node *ast.Document, reader te
|
|||
// color the blockquote
|
||||
v.SetAttributeString("class", []byte("attention-header attention-"+calloutType))
|
||||
|
||||
// Create new parargaph.
|
||||
// Create new paragraph.
|
||||
attentionParagraph := ast.NewParagraph()
|
||||
attentionParagraph.SetAttributeString("class", []byte("attention-title"))
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ func TestColorPreview(t *testing.T) {
|
|||
// no backticks
|
||||
"rgb(166, 32, 64)",
|
||||
// typo
|
||||
"`hsI(0, 100%, 50%)`",
|
||||
"`hsI(0, 100%, 50%)`", // codespell-ignore
|
||||
// looks like a color but not really
|
||||
"`hsl(40, 60, 80)`",
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
//
|
||||
// 4. Handler (represented by HandlerFuncT type):
|
||||
// - It's the function responsible for processing items. Each active worker will call it.
|
||||
// - If an item or some items are not psuccessfully rocessed, the handler could return them as "unhandled items".
|
||||
// - If an item or some items are not successfully processed, the handler could return them as "unhandled items".
|
||||
// In such scenarios, the queue system ensures these unhandled items are returned to the base queue after a brief delay.
|
||||
// This mechanism is particularly beneficial in cases where the processing entity (like a document indexer) is
|
||||
// temporarily unavailable. It ensures that no item is skipped or lost due to transient failures in the processing
|
||||
|
|
|
@ -49,9 +49,9 @@ 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")
|
||||
}
|
||||
|
||||
func TestJSEscapeSafe(t *testing.T) {
|
||||
|
|
|
@ -248,11 +248,11 @@ var ignoredErrorMessage = []string{
|
|||
// TestIssuePinMove
|
||||
`:IssuePinMove() [E] Issue does not belong to this repository`,
|
||||
// TestLinksLogin
|
||||
`:GetIssuesAllCommitStatus() [E] getAllCommitStatus: cant get commit statuses of pull [6]: object does not exist [id: refs/pull/2/head, rel_path: ]`,
|
||||
`:GetIssuesAllCommitStatus() [E] getAllCommitStatus: can't get commit statuses of pull [6]: object does not exist [id: refs/pull/2/head, rel_path: ]`,
|
||||
// TestLinksLogin
|
||||
`:GetIssuesAllCommitStatus() [E] getAllCommitStatus: cant get commit statuses of pull [6]: object does not exist [id: refs/pull/2/head, rel_path: ]`,
|
||||
`:GetIssuesAllCommitStatus() [E] getAllCommitStatus: can't get commit statuses of pull [6]: object does not exist [id: refs/pull/2/head, rel_path: ]`,
|
||||
// TestLinksLogin
|
||||
`:GetIssuesAllCommitStatus() [E] getAllCommitStatus: cant get commit statuses of pull [6]: object does not exist [id: refs/pull/2/head, rel_path: ]`,
|
||||
`:GetIssuesAllCommitStatus() [E] getAllCommitStatus: can't get commit statuses of pull [6]: object does not exist [id: refs/pull/2/head, rel_path: ]`,
|
||||
// TestLinksLogin
|
||||
`:GetIssuesAllCommitStatus() [E] Cannot open git repository <Repository 23:org17/big_test_public_4> for issue #1[20]. Error: no such file or directory`,
|
||||
// TestMigrate
|
||||
|
|
|
@ -49,12 +49,12 @@ func TestIsSvgImage(t *testing.T) {
|
|||
<!-- Comments -->
|
||||
<svg></svg>`)).IsSvgImage())
|
||||
assert.True(t, DetectContentType([]byte(`<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Multline
|
||||
<!-- Multiline
|
||||
Comment -->
|
||||
<svg></svg>`)).IsSvgImage())
|
||||
assert.True(t, DetectContentType([]byte(`<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Multline
|
||||
<!-- Multiline
|
||||
Comment -->
|
||||
<svg></svg>`)).IsSvgImage())
|
||||
|
||||
|
|
|
@ -45,7 +45,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:
|
||||
//
|
||||
|
|
20
poetry.lock
generated
20
poetry.lock
generated
|
@ -14,6 +14,23 @@ files = [
|
|||
[package.dependencies]
|
||||
colorama = {version = "*", markers = "platform_system == \"Windows\""}
|
||||
|
||||
[[package]]
|
||||
name = "codespell"
|
||||
version = "2.2.6"
|
||||
description = "Codespell"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "codespell-2.2.6-py3-none-any.whl", hash = "sha256:9ee9a3e5df0990604013ac2a9f22fa8e57669c827124a2e961fe8a1da4cacc07"},
|
||||
{file = "codespell-2.2.6.tar.gz", hash = "sha256:a8c65d8eb3faa03deabab6b3bbe798bea72e1799c7e9e955d57eca4096abcff9"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
dev = ["Pygments", "build", "chardet", "pre-commit", "pytest", "pytest-cov", "pytest-dependency", "ruff", "tomli", "twine"]
|
||||
hard-encoding-detection = ["chardet"]
|
||||
toml = ["tomli"]
|
||||
types = ["chardet (>=5.1.0)", "mypy", "pytest", "pytest-cov", "pytest-dependency"]
|
||||
|
||||
[[package]]
|
||||
name = "colorama"
|
||||
version = "0.4.6"
|
||||
|
@ -158,6 +175,7 @@ files = [
|
|||
{file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
|
||||
{file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"},
|
||||
{file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"},
|
||||
{file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"},
|
||||
{file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"},
|
||||
{file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"},
|
||||
{file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"},
|
||||
|
@ -357,4 +375,4 @@ dev = ["doc8", "flake8", "flake8-import-order", "rstcheck[sphinx]", "sphinx"]
|
|||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "cd2ff218e9f27a464dfbc8ec2387824a90f4360e04c3f2e58cc375796b7df33a"
|
||||
content-hash = "758325127b0a863bf7d1f0dbc50e3740c47ffe0073ff60fc6d7dce9759879125"
|
||||
|
|
|
@ -10,7 +10,21 @@ python = "^3.10"
|
|||
[tool.poetry.group.dev.dependencies]
|
||||
djlint = "1.34.1"
|
||||
yamllint = "1.35.1"
|
||||
codespell = "^2.2.6"
|
||||
|
||||
[tool.djlint]
|
||||
profile="golang"
|
||||
ignore="H005,H006,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,pyproject.toml,*.lock,venvs'
|
||||
# precise hits for CamelCased words,various other curious cases which require regex to ignore
|
||||
# entire line or some portion of it
|
||||
# TODO: Resolve Treshold typo in API and remove from here
|
||||
ignore-regex = '(\b(Treshold|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.*)|Iif|FilterIn|.*codespell-ignore.*'
|
||||
#|.*(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,unknow'
|
||||
|
|
|
@ -301,7 +301,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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -162,7 +162,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)
|
||||
|
|
|
@ -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 |
|
||||
| - | - |
|
||||
|
|
|
@ -805,7 +805,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
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -411,8 +411,8 @@ func ListIssues(ctx *context.APIContext) {
|
|||
}
|
||||
|
||||
var labelIDs []int64
|
||||
if splitted := strings.Split(ctx.FormString("labels"), ","); len(splitted) > 0 {
|
||||
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx, ctx.Repo.Repository.ID, splitted)
|
||||
if split := strings.Split(ctx.FormString("labels"), ","); len(split) > 0 {
|
||||
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx, ctx.Repo.Repository.ID, split)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetLabelIDsInRepoByNames", err)
|
||||
return
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -420,7 +420,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),
|
||||
})
|
||||
|
|
|
@ -30,7 +30,7 @@ func Organizations(ctx *context.Context) {
|
|||
explore.RenderUserSearch(ctx, &user_model.SearchUserOptions{
|
||||
Actor: ctx.Doer,
|
||||
Type: user_model.UserTypeOrganization,
|
||||
IncludeReserved: true, // administrator needs to list all acounts include reserved
|
||||
IncludeReserved: true, // administrator needs to list all accounts include reserved
|
||||
ListOptions: db.ListOptions{
|
||||
PageSize: setting.UI.Admin.OrgPagingNum,
|
||||
},
|
||||
|
|
|
@ -81,7 +81,7 @@ func Users(ctx *context.Context) {
|
|||
IsRestricted: util.OptionalBoolParse(statusFilterMap["is_restricted"]),
|
||||
IsTwoFactorEnabled: util.OptionalBoolParse(statusFilterMap["is_2fa_enabled"]),
|
||||
IsProhibitLogin: util.OptionalBoolParse(statusFilterMap["is_prohibit_login"]),
|
||||
IncludeReserved: true, // administrator needs to list all acounts include reserved, bot, remote ones
|
||||
IncludeReserved: true, // administrator needs to list all accounts include reserved, bot, remote ones
|
||||
ExtraParamStrings: extraParamStrings,
|
||||
}, tplUsers)
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ func ViewPost(ctx *context_module.Context) {
|
|||
resp.State.Run.CanRerun = run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions)
|
||||
resp.State.Run.CanDeleteArtifact = 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{
|
||||
|
@ -250,8 +250,8 @@ func ViewPost(ctx *context_module.Context) {
|
|||
if run.NeedApproval {
|
||||
resp.State.CurrentJob.Detail = ctx.Locale.TrString("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)
|
||||
|
||||
|
@ -270,7 +270,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 &&
|
||||
|
|
|
@ -812,7 +812,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 prioritized 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
|
||||
|
|
|
@ -1759,8 +1759,8 @@ func ViewIssue(ctx *context.Context) {
|
|||
// drop error since times could be pruned from DB..
|
||||
_ = comment.LoadTime(ctx)
|
||||
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 = templates.SanitizeHTML(comment.Content)
|
||||
|
@ -2752,8 +2752,8 @@ func ListIssues(ctx *context.Context) {
|
|||
}
|
||||
|
||||
var labelIDs []int64
|
||||
if splitted := strings.Split(ctx.FormString("labels"), ","); len(splitted) > 0 {
|
||||
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx, ctx.Repo.Repository.ID, splitted)
|
||||
if split := strings.Split(ctx.FormString("labels"), ","); len(split) > 0 {
|
||||
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx, ctx.Repo.Repository.ID, split)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
|
|
|
@ -392,6 +392,6 @@ func Action(ctx *context.Context) {
|
|||
ctx.HTML(http.StatusOK, tplFollowUnfollow)
|
||||
return
|
||||
}
|
||||
log.Error("Failed to apply action %q: unsupport context user type: %s", ctx.FormString("action"), ctx.ContextUser.Type)
|
||||
log.Error("Failed to apply action %q: unsupported context user type: %s", ctx.FormString("action"), ctx.ContextUser.Type)
|
||||
ctx.Error(http.StatusBadRequest, fmt.Sprintf("Action %q failed", ctx.FormString("action")))
|
||||
}
|
||||
|
|
|
@ -75,7 +75,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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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:])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,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
|
||||
|
|
|
@ -231,8 +231,8 @@ func TeamReviewRequest(ctx context.Context, issue *issues_model.Issue, doer *use
|
|||
|
||||
func ReviewRequestNotify(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, reviewNotifers []*ReviewRequestNotifier) {
|
||||
for _, reviewNotifer := range reviewNotifers {
|
||||
if reviewNotifer.Reviwer != nil {
|
||||
notify_service.PullRequestReviewRequest(ctx, issue.Poster, issue, reviewNotifer.Reviwer, reviewNotifer.IsAdd, reviewNotifer.Comment)
|
||||
if reviewNotifer.Reviewer != nil {
|
||||
notify_service.PullRequestReviewRequest(ctx, issue.Poster, issue, reviewNotifer.Reviewer, reviewNotifer.IsAdd, reviewNotifer.Comment)
|
||||
} else if reviewNotifer.ReviewTeam != nil {
|
||||
if err := teamReviewRequestNotify(ctx, issue, issue.Poster, reviewNotifer.ReviewTeam, reviewNotifer.IsAdd, reviewNotifer.Comment); err != nil {
|
||||
log.Error("teamReviewRequestNotify: %v", err)
|
||||
|
|
|
@ -36,7 +36,7 @@ func getMergeBase(repo *git.Repository, pr *issues_model.PullRequest, baseBranch
|
|||
type ReviewRequestNotifier struct {
|
||||
Comment *issues_model.Comment
|
||||
IsAdd bool
|
||||
Reviwer *user_model.User
|
||||
Reviewer *user_model.User
|
||||
ReviewTeam *org_model.Team
|
||||
}
|
||||
|
||||
|
@ -124,9 +124,9 @@ func PullRequestCodeOwnersReview(ctx context.Context, issue *issues_model.Issue,
|
|||
return nil, err
|
||||
}
|
||||
notifiers = append(notifiers, &ReviewRequestNotifier{
|
||||
Comment: comment,
|
||||
IsAdd: true,
|
||||
Reviwer: u,
|
||||
Comment: comment,
|
||||
IsAdd: true,
|
||||
Reviewer: u,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ func (h *ReplyHandler) Handle(ctx context.Context, content *MailContent, doer *u
|
|||
}
|
||||
|
||||
if content.Content == "" && len(attachmentIDs) == 0 {
|
||||
log.Trace("incoming mail has no content and no attachement", ref)
|
||||
log.Trace("incoming mail has no content and no attachment", ref)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -885,7 +885,7 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
|
|||
}
|
||||
|
||||
for _, comment := range review.Comments {
|
||||
// Skip code comment if it doesn't have a diff it is commeting on.
|
||||
// Skip code comment if it doesn't have a diff it is commenting on.
|
||||
if comment.DiffHunk == "" {
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -66,7 +66,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 {
|
||||
|
|
|
@ -46,7 +46,7 @@ func getCommitIDsFromRepo(ctx context.Context, repo *repo_model.Repository, oldC
|
|||
return commitIDs, isForcePush, err
|
||||
}
|
||||
|
||||
// Find commits between new and old commit exclusing base branch commits
|
||||
// Find commits between new and old commit excluding base branch commits
|
||||
commits, err := gitRepo.CommitsBetweenNotBase(newCommit, oldCommit, baseBranch)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
|
|
|
@ -881,7 +881,7 @@ func GetIssuesAllCommitStatus(ctx context.Context, issues issues_model.IssueList
|
|||
|
||||
statuses, lastStatus, err := getAllCommitStatus(ctx, 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
|
||||
|
|
|
@ -57,7 +57,7 @@ func getUsersByLoginName(ctx context.Context, name string) ([]*user_model.User,
|
|||
// LoginName set to the unique identifier of the originating authentication source
|
||||
// LoginSource set to the Remote source that can be matched against an OAuth2 source
|
||||
//
|
||||
// If the source from which an authentification happens is OAuth2, an existing
|
||||
// If the source from which an authentication happens is OAuth2, an existing
|
||||
// remote user will be promoted to an OAuth2 user provided:
|
||||
//
|
||||
// user.LoginName is the same as goth.UserID (argument loginName)
|
||||
|
|
|
@ -125,7 +125,7 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
|
|||
return nil
|
||||
}
|
||||
|
||||
// FindReposLastestCommitStatuses loading repository default branch latest combinded commit status with cache
|
||||
// FindReposLastestCommitStatuses loading repository default branch latest combined commit status with cache
|
||||
func FindReposLastestCommitStatuses(ctx context.Context, repos []*repo_model.Repository) ([]*git_model.CommitStatus, error) {
|
||||
if len(repos) == 0 {
|
||||
return nil, nil
|
||||
|
|
|
@ -86,7 +86,7 @@ func GetContributorStats(ctx context.Context, cache cache.Cache, repo *repo_mode
|
|||
if !cache.IsExist(cacheKey) {
|
||||
genReady := make(chan struct{})
|
||||
|
||||
// dont start multible async generations
|
||||
// dont start multiple async generations
|
||||
_, run := generateLock.Load(cacheKey)
|
||||
if run {
|
||||
return nil, ErrAwaitGeneration
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="{{ctx.Locale.Lang}}" data-theme="{{ThemeName .SignedUser}}">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{/* Display `- .Repsository.FullName` only if `.Title` does not already start with that. */}}
|
||||
{{/* Display `- .Repository.FullName` only if `.Title` does not already start with that. */}}
|
||||
<title>{{if .Title}}{{.Title}} - {{end}}{{if and (.Repository.Name) (not (StringUtils.HasPrefix .Title .Repository.FullName))}}{{.Repository.FullName}} - {{end}}{{AppName}}</title>
|
||||
{{if .ManifestData}}<link rel="manifest" href="data:{{.ManifestData}}">{{end}}
|
||||
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}">
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<div class="commit-divergence">
|
||||
<div class="bar-group">
|
||||
<div class="count count-behind">{{.CommitsBehind}}</div>
|
||||
{{/* old code bears 0/0.0 = NaN output, so it might output invalid "width: NaNpx", it just works and doesn't caues any problem. */}}
|
||||
{{/* old code bears 0/0.0 = NaN output, so it might output invalid "width: NaNpx", it just works and doesn't cause any problem. */}}
|
||||
<div class="bar bar-behind" style="width: {{Eval 100 "*" .CommitsBehind "/" "(" .CommitsBehind "+" .CommitsAhead "+" 0.0 ")"}}%"></div>
|
||||
</div>
|
||||
<div class="bar-group">
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<div class="tw-flex tw-flex-col tw-gap-2">
|
||||
<progress class="milestone-progress-big" value="{{.Milestone.Completeness}}" max="100"></progress>
|
||||
<div class="tw-flex tw-gap-4">
|
||||
<div classs="tw-flex tw-items-center">
|
||||
<div class="tw-flex tw-items-center">
|
||||
{{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix ctx.Locale}}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}}
|
||||
|
|
|
@ -21,7 +21,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
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ func TestActionsAutomerge(t *testing.T) {
|
|||
job := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionRunJob{ID: 292})
|
||||
|
||||
assert.False(t, pr.HasMerged, "PR should not be merged")
|
||||
assert.Equal(t, issues_model.PullRequestStatusMergeable, pr.Status, "PR should be mergable")
|
||||
assert.Equal(t, issues_model.PullRequestStatusMergeable, pr.Status, "PR should be mergeable")
|
||||
|
||||
scheduled, err := automerge.ScheduleAutoMerge(ctx, user, pr, repo_model.MergeStyleMerge, "Dummy")
|
||||
|
||||
|
|
|
@ -134,9 +134,9 @@ func TestAPIRepoIssueConfigPaths(t *testing.T) {
|
|||
".github/issue_template/config",
|
||||
}
|
||||
|
||||
for _, canidate := range templateConfigCandidates {
|
||||
for _, candidate := range templateConfigCandidates {
|
||||
for _, extension := range []string{".yaml", ".yml"} {
|
||||
fullPath := canidate + extension
|
||||
fullPath := candidate + extension
|
||||
t.Run(fullPath, func(t *testing.T) {
|
||||
defer tests.PrintCurrentTest(t)()
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -75,7 +75,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")
|
||||
|
@ -87,7 +87,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
|
||||
|
||||
|
@ -100,7 +100,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
|
||||
|
||||
|
@ -138,7 +138,7 @@ func TestCompareWithPRsDisabled(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
defer func() {
|
||||
// Reenable PRs on the repo
|
||||
// Re-enable PRs on the repo
|
||||
err := repo_service.UpdateRepositoryUnits(db.DefaultContext, repo,
|
||||
[]repo_model.RepoUnit{{
|
||||
RepoID: repo.ID,
|
||||
|
|
|
@ -405,7 +405,7 @@ func TestCommitMail(t *testing.T) {
|
|||
defer tests.PrintCurrentTest(t)()
|
||||
|
||||
// Upload two separate times, so we have two different 'uploads' that can
|
||||
// be used indepently of each other.
|
||||
// be used independently of each other.
|
||||
uploadFile := func(t *testing.T, name, content string) string {
|
||||
t.Helper()
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ func TestPullrequestReopen(t *testing.T) {
|
|||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Create the pull reuqest.
|
||||
// Create the pull request.
|
||||
pullIssue := &issues_model.Issue{
|
||||
RepoID: baseRepo.ID,
|
||||
Title: "Testing reopen functionality",
|
||||
|
|
|
@ -433,7 +433,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) {
|
|||
|
||||
t.Run("Submit approve/reject review on closed PR", func(t *testing.T) {
|
||||
// Created a closed PR (made by user1) in the upstream repo1.
|
||||
testEditFileToNewBranch(t, user1Session, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Editied...again)\n")
|
||||
testEditFileToNewBranch(t, user1Session, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Edited...again)\n")
|
||||
resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "a-test-branch", "This is a pull title")
|
||||
elem := strings.Split(test.RedirectURL(resp), "/")
|
||||
assert.EqualValues(t, "pulls", elem[3])
|
||||
|
|
|
@ -54,7 +54,7 @@ func testRenameBranch(t *testing.T, u *url.URL) {
|
|||
assert.Equal(t, "main", repo1.DefaultBranch)
|
||||
})
|
||||
|
||||
t.Run("Database syncronization", func(t *testing.T) {
|
||||
t.Run("Database synchronization", func(t *testing.T) {
|
||||
defer tests.PrintCurrentTest(t)()
|
||||
|
||||
req := NewRequestWithValues(t, "POST", "/user2/repo1/settings/rename_branch", map[string]string{
|
||||
|
|
|
@ -115,7 +115,7 @@ func TestRepoFork(t *testing.T) {
|
|||
defer tests.PrintCurrentTest(t)()
|
||||
|
||||
// Make sure the repo we try to fork is private.
|
||||
// We're also choosing user15/big_test_private_2, becase it has the Code unit disabled.
|
||||
// We're also choosing user15/big_test_private_2, because it has the Code unit disabled.
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 20, IsPrivate: true})
|
||||
|
||||
// user1, even though an admin, can't fork a repo without a code unit.
|
||||
|
|
8
web_src/fomantic/build/semantic.js
generated
8
web_src/fomantic/build/semantic.js
generated
|
@ -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() {
|
||||
succesful: function() { // codespell-ignore
|
||||
module.verbose('This behavior will be deleted due to typo. Use "was successful" instead.');
|
||||
return module.was.successful();
|
||||
},
|
||||
|
@ -1343,7 +1343,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();
|
||||
|
@ -2491,7 +2491,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();
|
||||
}
|
||||
|
|
2
web_src/js/bootstrap.js
vendored
2
web_src/js/bootstrap.js
vendored
|
@ -50,7 +50,7 @@ function processWindowErrorEvent({error, reason, message, type, filename, lineno
|
|||
const assetBaseUrl = String(new URL(__webpack_public_path__, window.location.origin));
|
||||
const {runModeIsProd} = window.config ?? {};
|
||||
|
||||
// `error` and `reason` are not guaranteed to be errors. If the value is falsy, it is likly a
|
||||
// `error` and `reason` are not guaranteed to be errors. If the value is falsy, it is likely a
|
||||
// non-critical event from the browser. We log them but don't show them to users. Examples:
|
||||
// - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#observation_errors
|
||||
// - https://github.com/mozilla-mobile/firefox-ios/issues/10817
|
||||
|
|
Loading…
Reference in a new issue