Giteabot
a8f98fd3be
fix trailing comma not matched in the case of alphanumeric issue ( #32945 ) ( #32959 )
...
Backport #32945 by @katsusan
Fix #32428 .
Patch the regex to match `,`besides `.` `"` `'` `:` and space.
Co-authored-by: katsu <evergonuaa@gmail.com>
2024-12-23 06:08:35 +08:00
TheFox0x7
33e8e82c4b
Enable tenv and testifylint rules ( #32852 )
...
Enables tenv and testifylint linters
closes: https://github.com/go-gitea/gitea/issues/32842
2024-12-15 10:41:29 +00:00
wxiaoguang
ce08a9fe2f
Fix markdown rendering when mentioning users ( #30795 )
2024-05-02 01:00:46 +00:00
charles
9043584779
Fix issue link does not support quotes ( #29484 ) ( #29487 )
...
Close #29484
![圖片](https://github.com/go-gitea/gitea/assets/30816317/b27e6e16-67e0-469c-8e04-30180c585890 )
2024-03-02 09:54:46 +00:00
Adam Majer
d68a613ba8
Add support for sha256 repositories ( #23894 )
...
Currently only SHA1 repositories are supported by Gitea. This adds
support for alternate SHA256 with the additional aim of easier support
for additional hash types in the future.
Fixes : #13794
Limited by: https://github.com/go-git/go-git/issues/899
Depend on: #28138
<img width="776" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/5448c9a7-608e-4341-a149-5dd0069c9447 ">
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2024-01-19 17:05:02 +01:00
Nanguan Lin
da50be7360
Replace 'userxx' with 'orgxx' in all test files when the user type is org ( #27052 )
...
Currently 'userxx' and 'orgxx' are both used as username in test files
when the user type is org, which is confusing. This PR replaces all
'userxx' with 'orgxx' when the user type is org(`user.type==1`).
Some non-trivial changes
1. Rename `user3` dir to `org3` in `tests/git-repositories-meta`
2. Change `end` in `issue reference` because 'org3' is one char shorter
than 'user3'
![ksnip_20230913-112819](https://github.com/go-gitea/gitea/assets/70063547/442988c5-4cf4-49b8-aa01-4dd6bf0ca954 )
3. Change the search result number of `user/repo2` because
`user3/repo21` can't be searched now
![ksnip_20230913-112931](https://github.com/go-gitea/gitea/assets/70063547/d9ebeba4-479f-4110-9a85-825efbc981fd )
4. Change the first org name getting from API because the result is
ordered by alphabet asc and now `org 17` is before `org25`
![JW8U7NIO(J$H
_YCRB36H)T](https://github.com/go-gitea/gitea/assets/70063547/f55a685c-cf24-40e5-a87f-3a2327319548 )
![)KFD411O4I8RB5ZOH7E0
Z3](https://github.com/go-gitea/gitea/assets/70063547/a0dc3299-249c-46f6-91cb-d15d4ee88dd5 )
Other modifications are just find all and replace all.
Unit tests with SQLite are all passed.
---------
Co-authored-by: caicandong <1290147055@qq.com>
2023-09-14 02:59:53 +00:00
wxiaoguang
36dc11869d
Use correct captured group range when parsing cross-reference ( #22672 )
...
Fixes #22666 (Replace #22668 )
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: zeripath <art27@cantab.net>
2023-01-31 10:08:05 +01:00
KN4CK3R
d0d257b243
Add support for commit cross references ( #22645 )
...
Fixes #22628
This PR adds cross references for commits by using the format
`owner/repo@commit` . References are rendered like
[go-gitea/lgtm@6fe88302 ](#dummy).
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-01-30 09:50:01 +08:00
flynnnnnnnnnn
e81ccc406b
Implement FSFE REUSE for golang files ( #21840 )
...
Change all license headers to comply with REUSE specification.
Fix #16132
Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2022-11-27 18:20:29 +00:00
wxiaoguang
0614ae1c44
Remove unnecessary misspell ignore pattern ( #21475 )
...
It doesn't make sense to ignore the pattern again and again.
2022-10-18 12:52:25 -04:00
6543
54e9ee37a7
format with gofumpt ( #18184 )
...
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
2022-01-20 18:46:10 +01:00
luzpaz
e0296b6a6d
Fix various documentation, user-facing, and source comment typos ( #16367 )
...
* Fix various doc, user-facing, and source comment typos
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby`
2021-07-08 13:38:13 +02:00
Steven
2e0f315617
Respect default merge message syntax when parsing item references ( #15772 )
...
* Respect merge message structure for parsing item references
Signed-off-by: JustusBunsi <61625851+justusbunsi@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
2021-05-09 19:25:23 +01:00
a1012112796
34df4e5df5
Add mentionable teams to tributeValues and change team mention rules to gh's style ( #13198 )
...
* Add mentionable teams to tributeValues
Signed-off-by: a1012112796 <1012112796@qq.com>
* Apply suggestions from code review
Co-authored-by: silverwind <me@silverwind.io>
* Change team mention rules to gh's style
* use org's avator as team avator in ui
Signed-off-by: a1012112796 <1012112796@qq.com>
* Update modules/markup/html.go
* Update models/issue.go
Co-authored-by: Lauris BH <lauris@nix.lv>
* Update models/issue.go
* fix a small nit and update test code
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
2020-12-21 16:39:28 +01:00
zeripath
77e5081a2e
Fix panic bug in handling multiple references in commit ( #13486 )
...
* Fix panic bug in handling multiple references in commit
The issue lay in determining the position of matches on a second run round
a commit message in FindAllIssueReferences.
Fix #13483
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Extract function and make testable
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix the comment
Signed-off-by: Andrew Thornton <art27@cantab.net>
* cleaning up the comments a bit more
Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-11-10 00:57:47 +02:00
Lauris BH
e710a34981
Add spent time to referenced issue in commit message ( #12220 )
2020-09-04 11:37:37 -04:00
guillep2k
131baa26be
Accept punctuation after simple+cross repository issue references ( #10091 )
...
* Support references ending in , . and ;
* Accept :;, in simple refs; fix 2+ consecutive refs
* Include cross-repository references
* Add ?!, fix spacing problem
2020-02-01 18:01:30 +00:00
zeripath
27757714d0
Change markdown rendering from blackfriday to goldmark ( #9533 )
...
* Move to goldmark
Markdown rendering moved from blackfriday to the goldmark.
Multiple subtle changes required to the goldmark extensions to keep
current rendering and defaults.
Can go further with goldmark linkify and have this work within markdown
rendering making the link processor unnecessary.
Need to think about how to go about allowing extensions - at present it
seems that these would be hard to do without recompilation.
* linter fixes
Co-authored-by: Lauris BH <lauris@nix.lv>
2019-12-31 03:53:28 +02:00
guillep2k
6a90c7e3dd
Alternate syntax for cross references ( #9116 )
...
* Add support for local vs. remote xrefs
* Add doc for references
* Docs: fix cases not currently supported
* One more doc fix
* Doc: mentions for teams and orgs
* Change !num ref concept, no change in functionality
* Fix test
* Improve table of issue reference types
* Fix paragraph mark
2019-12-01 15:57:05 +02:00
guillep2k
bb04fb55d7
Enable punctuations ending mentions ( #8889 )
...
* Enable punctuations ending mentions
* Improve tests
2019-11-09 17:12:05 -05:00
guillep2k
f9944c0e69
Configurable close and reopen keywords for PRs ( #8120 )
...
* Add settings for CloseKeywords and ReopenKeywords
* Fix and improve tests
* Use sync.Once() for initialization
* Fix unintended exported function
2019-10-30 14:43:59 +02:00
guillep2k
15809d81f7
Rewrite reference processing code in preparation for opening/closing from comment references ( #8261 )
...
* Add a markdown stripper for mentions and xrefs
* Improve comments
* Small code simplification
* Move reference code to modules/references
* Fix typo
* Make MarkdownStripper return [][]byte
* Implement preliminary keywords parsing
* Add FIXME comment
* Fix comment
* make fmt
* Fix permissions check
* Fix text assumptions
* Fix imports
* Fix lint, fmt
* Fix unused import
* Add missing export comment
* Bypass revive on implemented interface
* Move mdstripper into its own package
* Support alphanumeric patterns
* Refactor FindAllMentions
* Move mentions test to references
* Parse mentions from reference package
* Refactor code to implement renderizable references
* Fix typo
* Move patterns and tests to the references package
* Fix nil reference
* Preliminary rendering attempt of closing keywords
* Normalize names, comments, general tidy-up
* Add CSS style for action keywords
* Fix permission for admin and owner
* Fix golangci-lint
* Fix golangci-lint
2019-10-13 23:29:10 +01:00