wxiaoguang
65248945c9
Refactor locale&string&template related code ( #29165 )
...
Clarify when "string" should be used (and be escaped), and when
"template.HTML" should be used (no need to escape)
And help PRs like #29059 , to render the error messages correctly.
(cherry picked from commit f3eb835886031df7a562abc123c3f6011c81eca8)
Conflicts:
modules/web/middleware/binding.go
routers/web/feed/convert.go
tests/integration/branches_test.go
tests/integration/repo_branch_test.go
trivial context conflicts
2024-02-16 15:20:52 +01:00
KN4CK3R
d565d85160
Extract linguist code to method ( #29168 )
...
(cherry picked from commit 94d06be035bac468129903c9f32e785baf3c1c3b)
2024-02-16 15:20:52 +01:00
oliverpool
0fc61c8836
[BUG] split code conversations in diff tab ( #2306 )
...
Follow-up of #2282 and #2296 (which tried to address #2278 )
One of the issue with the previous PR is that when a conversation on the Files tab was marked as "resolved", it would fetch all the comments for that line (even the outdated ones, which should not be shown on this page - except when explicitly activated).
To properly fix this, I have changed `FetchCodeCommentsByLine` to `FetchCodeConversation`. Its role is to fetch all comments related to a given (review, path, line) and reverted my changes in the template (which were based on a misunderstanding).
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2306
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
2024-02-16 12:16:11 +00:00
Earl Warren
c8b177713a
[CLEANUP] make golangci-lint@v1.56.1 happy
2024-02-15 16:19:36 +01:00
Chris Copeland
83123b493f
Add merge style fast-forward-only
( #28954 )
...
With this option, it is possible to require a linear commit history with
the following benefits over the next best option `Rebase+fast-forward`:
The original commits continue existing, with the original signatures
continuing to stay valid instead of being rewritten, there is no merge
commit, and reverting commits becomes easier.
Closes #24906
2024-02-14 17:19:19 +01:00
Earl Warren
05eaf1cf3e
Merge pull request 'Repository settings refactor' ( #2221 ) from algernon/forgejo:repo-units/ui-refactor into forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2221
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-02-14 13:29:04 +00:00
Gergely Nagy
8075721823
Minor cleanup in ViewLatestWorkflowRun
...
Use `ctx.ServerError` instead of a separate `log.Error` + `ctx.Error`.
`ctx.ServerError` does essentially the same thing, but better.
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-13 23:20:16 +01:00
Gergely Nagy
fa73375e13
Split out repository unit settings
...
This splits out the repository unit settings (formerly "Advanced
settings" under the repository settings page) into their own, separate
page.
The primary reason for this is that the settings page became long and
complicated, with a structure that not always made sense. A secondary
reason is that toggling units on and off should not necessarily be an
"advanced" setting. We want to make doing that easier, and having the
units on their own page helps with that.
This is basically a refactor, there is no new functionality introduced,
just an extra pair of routes for the new page, and the supporting code.
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-13 22:42:09 +01:00
Earl Warren
98e7753ade
Merge pull request '[FEAT]: Allow forking without a repo ID' ( #2310 ) from algernon/forgejo:f/repo/fork-route into forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2310
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-12 13:36:49 +00:00
Clemens
2e41fe0a46
fix import
2024-02-12 13:00:47 +01:00
Alexandre Oliveira
29007c09bd
Fix Alpine Registry packages with noarch not being found ( #2285 )
...
Fixes #2173
~~Still requires a bit of work to do, I'm not 100% happy with this solution.~~
The idea is to copy the noarch package to the architectures available in the package repository.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2285
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Alexandre Oliveira <me+codeberg@aoalmeida.com>
Co-committed-by: Alexandre Oliveira <me+codeberg@aoalmeida.com>
2024-02-11 18:02:56 +00:00
Earl Warren
40b9f3996b
Merge pull request '[FEAT]: New route to view latest run of specific workflows' ( #2304 ) from algernon/forgejo:f/web/actions/workflow-latest-run-routes into forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2304
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-11 07:34:08 +00:00
Michael Jerger
6e6813a88b
make operatorid unique
2024-02-10 15:23:04 +01:00
Michael Jerger
eecb9b8040
fmt fix
2024-02-10 15:22:30 +01:00
Michael Jerger
5fa62287d6
undo rebase conflicts
2024-02-10 15:21:45 +01:00
Michael Jerger
3ef57385ec
fix linting
2024-02-10 15:21:22 +01:00
Michael Jerger
b2cc848e7d
clean up aliases
2024-02-10 15:20:48 +01:00
Michael Jerger
91f7541add
refactor for semantic and cycle free deps
2024-02-10 15:20:17 +01:00
Michael Jerger
66bc7a9a0c
Search federatedUser instead of loginName
2024-02-10 15:20:09 +01:00
Michael Jerger
edf7f61b83
mv federated_user_creation to user package
2024-02-10 15:19:55 +01:00
Michael Jerger
a702da69cc
added test for federated user
2024-02-10 15:19:40 +01:00
Michael Jerger
a1ca7e958a
use local fqdn for generated user email
2024-02-10 15:19:09 +01:00
Michael Jerger
c58a995fb2
refactor FederationInfo -> FederationHost
2024-02-10 15:18:56 +01:00
Michael Jerger
1b35bd2911
lint fix
2024-02-10 15:18:46 +01:00
Michael Jerger
c4eb763f4a
lint fix
2024-02-10 15:18:45 +01:00
Michael Jerger
ca5eaa8c6b
introduce FI Factory
2024-02-10 15:18:43 +01:00
Michael Jerger
dabd773f6b
Fix error handling & add timestamp check
2024-02-10 15:18:43 +01:00
Michael Jerger
40ec049013
add the next todo
2024-02-10 15:18:42 +01:00
Clemens
1f989f2ecd
Added FederationInfo Create function
2024-02-10 15:18:41 +01:00
Michael Jerger
380d3db0bf
integrate federation info in api call
2024-02-10 15:18:40 +01:00
bom
87bfa79f71
Configure client against DOS
2024-02-10 15:18:25 +01:00
Michael Jerger
ecf391dcbf
add some user creation unittests
2024-02-10 15:17:24 +01:00
Michael Jerger
de2569618c
fix: wmail should start with char
2024-02-10 15:17:23 +01:00
Michael Jerger
6e46739090
validate person
2024-02-10 15:17:14 +01:00
Michael Jerger
0505baab2b
ad validation for like activity
2024-02-10 15:17:13 +01:00
Michael Jerger
3ab2d9a449
rename star -> ForgeLike
2024-02-10 15:17:12 +01:00
Michael Jerger
4473fb788a
start refactoring star->like
2024-02-10 15:17:11 +01:00
Michael Jerger
b2a9b53041
use nodeInfo.Source instead of startActivity.Source
2024-02-10 15:17:07 +01:00
Michael Jerger
8116214727
introduce nodeinfo
2024-02-10 15:17:07 +01:00
Michael Jerger
587bd07372
mv more fkt to http-client
2024-02-10 15:17:06 +01:00
bom
310d740cee
Start NodeInfo implementation
2024-02-10 15:17:05 +01:00
Michael Jerger
e704e5adcc
adjust to ugly linting
2024-02-10 15:17:04 +01:00
erik
1e40b814a1
Linting
2024-02-10 15:17:03 +01:00
erik
8585edc47a
Linting
2024-02-10 15:17:03 +01:00
Michael Jerger
7d78fb8adc
adjust to ugly linting
2024-02-10 15:17:02 +01:00
erik
15775ad891
Fix import
2024-02-10 15:16:57 +01:00
erik
715afb2468
Add newlines for readability
2024-02-10 15:16:56 +01:00
erik
4d1492831d
Move char_limiter to utils and rename
2024-02-10 15:16:47 +01:00
erik
afc9acd925
Limit number of characters on body log
2024-02-10 15:16:45 +01:00
erik
3363b3bf0c
Validate response before further processing
2024-02-10 15:16:44 +01:00
erik
ff146a9430
Add review todos
2024-02-10 15:16:40 +01:00
erik
071b47b8d0
Catch edge case: remote user does not exist on remote repo
2024-02-10 15:16:36 +01:00
erik
3327fbc39a
Fix typos, small rewordings
2024-02-10 15:16:32 +01:00
Michael Jerger
1704ac5bc2
fix most of the tests
2024-02-10 15:14:35 +01:00
Michael Jerger
e1d7db178c
unify logging & minor improvements
2024-02-10 15:14:31 +01:00
Michael Jerger
42854c9003
remove global actionUser
2024-02-10 15:14:30 +01:00
Michael Jerger
a0c008b880
cleand up user creation from ap
2024-02-10 15:14:29 +01:00
Michael Jerger
6de8fba14d
minor refactorings
2024-02-10 15:14:26 +01:00
Michael Jerger
c2a42587d2
remove panics - that is not a exception replacement
2024-02-10 15:14:23 +01:00
Michael Jerger
b27460d3fe
minor refactorings & reviews
2024-02-10 15:14:20 +01:00
Michael Jerger
bad8e04c3c
cleanup & minor refactorings
2024-02-10 15:14:15 +01:00
Michael Jerger
1fe35e14a5
mv our actor code to forgefed
2024-02-10 15:14:07 +01:00
Michael Jerger
abdf56dde1
move forgefed to models
2024-02-10 15:14:06 +01:00
Michael Jerger
b5a467e94d
remove unused & implement webfinger
2024-02-10 15:10:38 +01:00
Michael Jerger
73a38ea0d1
use new factory function
2024-02-10 15:10:38 +01:00
Michael Jerger
e8371ca94c
ActorId -> PersonId
2024-02-10 15:10:37 +01:00
Michael Jerger
be4d3544ae
Refactor ActorID -> ActorId
2024-02-10 15:10:36 +01:00
Michael Jerger
7c86f13728
make route more compact
2024-02-10 15:10:36 +01:00
erik
a10a9141f8
Remove useless call to repo, add todos
2024-02-10 15:10:34 +01:00
erik
3c515c2614
Add review todos
2024-02-10 15:10:33 +01:00
erik
22d71e6b30
Update ToDo
2024-02-10 15:10:33 +01:00
erik
afe659f9f4
Implement 5s waiting
2024-02-10 15:10:32 +01:00
erik
745598bba4
Implement starring
2024-02-10 15:10:29 +01:00
erik
976256bf3d
Refactor if conditional to switch, use split up functions
2024-02-10 15:10:28 +01:00
erik
75ee273f40
Split user creation and saving user to db
2024-02-10 15:10:27 +01:00
erik
7f4667696f
Cleanup imports
2024-02-10 15:10:25 +01:00
erik
f84e0b27e1
Use ValidateAndParseIRI, pass this to ParseActorID
2024-02-10 15:10:21 +01:00
erik
54ef78034e
Don't parse received repoID
2024-02-10 15:10:15 +01:00
erik
e3defaa212
Split getPersonByRest function
...
This leaves us with two easier to read functions, encapsulating
two different functionalities.
2024-02-10 15:10:14 +01:00
Michael Jerger
28a290da10
reviewed current work
2024-02-10 15:10:13 +01:00
erik
d27cac5bae
Move federated user creation to func
2024-02-10 15:10:11 +01:00
erik
01506f9836
Clearer description
2024-02-10 15:10:11 +01:00
erik
77b6402e77
Add missing error treatment
2024-02-10 15:10:10 +01:00
erik
946e5cf34c
Remove typo in func
2024-02-10 15:10:10 +01:00
erik
2fb893843b
Move getting person to own function
2024-02-10 15:10:08 +01:00
erik
6d143e74cf
More clear distinction between sender and receiver of star
2024-02-10 15:10:07 +01:00
Michael Jerger
9b5d8bbeda
If we use user.loginname to store the actor.id we can search for local users earlier
2024-02-10 15:10:04 +01:00
erik
ed1af14ceb
Panic on error, use correct function names
2024-02-10 15:10:04 +01:00
erik
9dcbe0177e
Rename targe to remoteStargazer
2024-02-10 15:10:03 +01:00
erik
de9e4dea61
Update todos, remove comments
2024-02-10 15:10:02 +01:00
erik
68cc74d139
Use actionsUser for creating http client
2024-02-10 15:10:01 +01:00
erik
d65e5aa70e
Move helper functions to top
2024-02-10 15:10:00 +01:00
Mirco
1c145d9d68
WIP: fit generateUUIDMail for testing purposes
2024-02-10 15:10:00 +01:00
Mirco
11e93784fe
WIP: log Info User created
2024-02-10 15:09:59 +01:00
Mirco
a20f535211
WIP: pwdgen, username
2024-02-10 15:09:58 +01:00
erik
85e09a7ada
WIP: Generate User if not exists
2024-02-10 15:09:58 +01:00
Michael Jerger
94880d64f4
higlight the need for id normalization
2024-02-10 15:09:57 +01:00
Michael Jerger
231bdb65b8
searching for the local person
2024-02-10 15:09:57 +01:00
erik
edd7fb77fd
WIP create user if not exists
2024-02-10 15:09:56 +01:00
erik
41e12d09ef
WIP create User from person
2024-02-10 15:09:55 +01:00
erik
c8456d57ff
Add thoughts on user creation
2024-02-10 15:09:54 +01:00
erik
22ba03ae4d
Don't use redundant implementation of person
2024-02-10 15:09:51 +01:00
erik
a8d5e7ba77
Fix typos and format
2024-02-10 15:09:41 +01:00
erik
d43c4ba739
Use person generation
2024-02-10 15:09:38 +01:00
erik
9f016d3673
Move to extra var
2024-02-10 15:09:37 +01:00
erik
fde8de4f90
Rename to ParseActorIDFromStarActivity
2024-02-10 15:09:35 +01:00
erik
e60d89cb67
Use correct target for get request
2024-02-10 15:09:33 +01:00
erik
0388240039
WIP Use non generated HTTP client
2024-02-10 15:09:32 +01:00
erik
6284355e1e
Remove redundant ValidateStar and err check, call coorect function
2024-02-10 15:09:29 +01:00
erik
546ce50337
Use PanicIfInvalid in repository.go
2024-02-10 15:09:27 +01:00
erik
8300d3fbde
Add ToDos from code review
2024-02-10 15:09:25 +01:00
erik
34c511ae98
Use data from actor, improve formatting
2024-02-10 15:09:24 +01:00
erik
aee2ee2596
Also log error on person creation
2024-02-10 15:09:24 +01:00
erik
3d2b5115ad
Implement and use Validatable interface
2024-02-10 15:09:18 +01:00
erik
235ed7cd1e
Rename to actorID
2024-02-10 15:09:18 +01:00
Michael Jerger
5e111f14ef
use the swagger-api
2024-02-10 15:09:17 +01:00
Michael Jerger
5c998a5c46
add comment
2024-02-10 15:09:08 +01:00
erik
5729cee3e5
Move test to model/activitypub
2024-02-10 15:09:07 +01:00
erik
7193c0bd9b
WIP test for parsing the actor
2024-02-10 15:09:07 +01:00
erik
0c367070af
Call validate star
2024-02-10 15:09:06 +01:00
erik
78fc75135f
Rename to ActorData
2024-02-10 15:09:04 +01:00
erik
91dcd59e68
Import parser from model and call validation
2024-02-10 15:09:00 +01:00
erik
e44321221e
WIP: Add test for parser
2024-02-10 15:08:55 +01:00
erik
ad65976677
Reorder functions
2024-02-10 15:08:54 +01:00
erik
d52bb4bf8f
Remove newline from error string
2024-02-10 15:08:52 +01:00
erik
b869d91dc1
Parse Actor URL
2024-02-10 15:08:51 +01:00
erik
9fa8d19cf4
Fix typo
2024-02-10 15:08:47 +01:00
Michael Jerger
d10c1094d9
add some pseudocode
2024-02-10 15:08:45 +01:00
erik
ab92891091
Use actor
2024-02-10 15:08:41 +01:00
erik
b085ce37a6
Review
2024-02-10 15:08:40 +01:00
erik
d7abff31f6
Add ToDos
2024-02-10 15:08:36 +01:00
erik
f48b4d1f55
Get Activity field from star
2024-02-10 15:08:29 +01:00
Michael Jerger
1044e44ee5
we got a parsed actor
2024-02-10 15:08:12 +01:00
Michael Jerger
b08580280a
np in case of unauthenticated user
2024-02-10 15:08:10 +01:00
Michael Jerger
460e2fb644
prepare next steps
2024-02-10 15:08:00 +01:00
erik
5b01517c12
Get data from form
2024-02-10 15:08:00 +01:00
Michael Jerger
dc1a82bf4c
use star as swagger model
2024-02-10 15:07:48 +01:00
Michael Jerger
46fb4fec8f
add star activity & bind to swagger
2024-02-10 15:07:40 +01:00
Michael Jerger
ff5a4405fd
introduce repo from exosy
2024-02-10 15:07:39 +01:00
Michael Jerger
7195141805
wip: lets define the post input more close
2024-02-10 15:07:29 +01:00
Michael Jerger
6587b6d62b
log who is doing the inbox post
2024-02-10 15:07:28 +01:00
Michael Jerger
4e1e65e14f
log repository under activity
2024-02-10 15:07:26 +01:00
Michael Jerger
fe6f625923
temp deactivate security
2024-02-10 15:07:25 +01:00
Michael Jerger
87324d1553
ctx action should no be good enough
2024-02-10 15:07:22 +01:00
Michael Jerger
0d5702e501
fill in some minimal information to an actor
2024-02-10 15:07:20 +01:00
Michael Jerger
fe2a3d86d4
get repo now works somehow
2024-02-10 15:07:14 +01:00
Michael Jerger
64abf87fb0
added some logs
2024-02-10 15:07:11 +01:00
Mirco
511ab65df4
Fix syntax error, unexpected new line
2024-02-10 15:07:07 +01:00
Michael Jerger
154be0a637
wip: compile one step further
2024-02-10 15:07:06 +01:00
Michael Jerger
317b7fac8f
wip: load repo to ctx
2024-02-10 15:07:05 +01:00