3320 Commits

Author SHA1 Message Date
zeripath
81b29d6263 Update assignees check to include any writing team and change org sidebar () ()
Backport 

Following the merging of  teams can now have differing write and readonly permissions, however the assignee list will not include teams which have mixed perms.

Further the org sidebar is no longer helpful as it can't describe these mixed permissions situations.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-24 09:22:46 +08:00
efc78c18c1 Fix ldap edit bug () 2022-02-22 17:31:29 -05:00
Wim
36148ed083 Show fullname on issue edits and gpg/ssh signing info ()
Co-authored-by: zeripath <art27@cantab.net>
2022-02-20 21:47:17 +00:00
db4c7dcf15 Put buttons back in org dashboard () ()
Backport 

Fix 
2022-02-20 19:51:01 +00:00
ad789542b8 Fix template bug of LFS lock () ()
Backport  

Fix 
2022-02-16 17:16:04 +00:00
69a158dcc2 Fix a broken link in commits_list_small.tmpl () 2022-02-14 12:03:51 +00:00
zeripath
044cb09ae8 Prevent double encoding of branch names in delete branch () ()
Backport 

* Prevent double encoding of branch names in delete branch

There is a double encoding issue in branch template whereby the branch name
ends up double encoded.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>

* and tag name

Signed-off-by: Andrew Thornton <art27@cantab.net>

* And fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-12 15:17:45 +00:00
zeripath
65ad6362d7 Separate the details links of commit-statuses in headers () ()
Backport 
2022-02-12 11:40:55 +08:00
f9a0ae1dd4 Fix release typo () () 2022-02-11 20:15:34 -05:00
63628fdf1c Fix bug for version update hint () ()
* Fix bug for version update hint ()
* Add translation for zh-CN

Co-authored-by: silverwind <me@silverwind.io>
2022-02-10 18:35:24 +00:00
singuliere
fabc0ad157 comments on migrated issues/prs must link to the comment ID ()
Instead of the issue ID which is not a valid anchor.

Signed-off-by: singuliere <singuliere@autistici.org>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-02-06 19:40:08 +08:00
zeripath
f65e29c077 Ensure that blob-excerpt links work for wiki () ()
Backport 

It appears that the blob-excerpt links do not work on the wiki - likely since their
introduction.

This PR adds support for the wiki on these links.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-06 04:22:20 +00:00
fnetX (aka fralix)
1fc9f11253 Add dropdown icon to template loading dropdown () 2022-02-03 11:28:27 +01:00
zeripath
72fa108cbc Fix review excerpt () ()
Backport 

Currently the "File Changed" tab of a PR is somehow broken. This is also true for the current release 1.16.0.

When you are on the "File Changed" tab, and want to look at code excerpt before or after the code changes, the layout breaks. You can test this on try.gitea.io here: https://try.gitea.io/testnotexisting/magic_enum/pulls/2/files

The problem occurs for the unified view and for the split view.

Kind of the same problem was there for commenting a line of code, this was fixed in  and .

For consistency, I changed the solution of , I removed the ``colspan`` and instead added a ``<td>``. The goal was to have code similarly with the split view.

Also the separator line in the split view was in the wrong column, this was fixed too.* more consistent unified review comment

Fix 

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: confusedsushi <confused.sushi@googlemail.com>
2022-02-02 08:38:28 +00:00
Gusted
f7606de13a Use "read" value for General Access () ()
- Backport of 
2022-02-01 20:24:27 +00:00
zeripath
781ad8a79e Fix broken oauth2 authentication source edit page () ()
Backport 

It appears that there was a broken merge of the edit.tmpl page during the merge
of  - I am not entirely sure how this happened as the PR was correct.

This PR fixes the broken template.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-01-26 23:48:33 +00:00
Gusted
0b83cc21be Fix commit's time () ()
- Backport of 
2022-01-25 05:48:56 +00:00
f19f53c077 Left-Align text in Unicode warning boxes ()
Wrapped text is more readable when left-aligned.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
2022-01-19 19:25:08 +00:00
zeripath
6779d9726f Only warn on bidi but still escape non-bidi ()
Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-01-19 19:24:15 +00:00
6fba174606 Fix incorrect OAuth message ()
As the title,

Fix 
2022-01-19 19:05:06 +00:00
84f8ef3df6 Fix PR comments UI ()
Closes:
* Review comment cannot be edited 
* Changing PR Comment Resolved State Disables Further Changes 
2022-01-19 01:28:38 +08:00
Gusted
9dcf0bf6ec Fix commit links on compare page ()
* Fix commit links on compare page

- Use the correct repo link for each commit(the headrepo). As for
compare pages were baserepo != headrepo, it wouldn't have the correct
link.

Co-authored-by: zeripath <art27@cantab.net>
2022-01-18 16:12:10 +00:00
Peter Gardfjäll
89a3214352 Add MirrorUpdated field to Repository API type ()
Add the last update time to the repository api type.

Close 
2022-01-18 13:18:30 +00:00
zeripath
52bfb7f012 Handle missing default branch better in owner/repo/branches page ()
This PR more nicely handles a missing default branch in owner/repo/branches

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-01-16 22:59:16 +08:00
zeripath
7960c96c19 Remove accidental debugging in blob_excerpt.tmpl ()
* Remove accidental debugging in blob_excerpt.tmpl

Unfortunately it appears that a small bit of debugging code was left in blob_excerpt.tmpl
This breaks diff expansion causing .

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-16 09:31:41 +00:00
zeripath
d7c2a2951c Webauthn nits ()
This contains some additional fixes and small nits related to  

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-15 17:52:56 +01:00
35c3553870 Support webauthn ()
Migrate from U2F to Webauthn

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-14 16:03:31 +01:00
dd135c6258 Fix release link broken ()
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-13 15:14:53 +02:00
72cced1f3e Fix purple color in suggested label colors ()
This looks like a typo that was introduced when these colors were added,
causing what is supposed to be purple show up as green.
2022-01-11 12:11:40 -06:00
zeripath
09d2029b6c Prevent NPE when viewing non-rendered files ()
Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-01-11 18:18:52 +01:00
0857c197a0 Fix collobration template () 2022-01-11 12:33:47 +00:00
luzpaz
8c647bf0f6 Fix various typos ()
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon`

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-01-10 17:32:37 +08:00
capvor
3a0dee01ed In the Organization member page, 2fa column is too narrow for Simplified Chinese and Chinese Traditional. ()
Expand 2fa column and Narrow the last column.
2022-01-09 00:21:10 +08:00
23f5a34c89 Fix new team ()
fix regression from 
2022-01-08 15:19:36 +00:00
80705cf4b4 Fix mermaid rendering in milestone dashboard ()
Fixes: https://github.com/go-gitea/gitea/issues/18200
2022-01-07 11:49:27 +08:00
zeripath
21ed4fd8da Add warning for BIDI characters in page renders and in diffs ()
Fix 

Given the comments I've adjusted this somewhat. The numbers of characters detected are increased and include things like the use of U+300 to make à instead of à and non-breaking spaces.

There is a button which can be used to escape the content to show it.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Gwyneth Morgan <gwymor@tilde.club>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-07 02:18:52 +01:00
KN4CK3R
bf7b083cfe Add replay of webhooks. () 2022-01-05 15:00:20 -06:00
a38ba634a4 Load EasyMDE/CodeMirror dynamically, remove RequireEasyMDE ()
This PR makes frontend load EasyMDE/CodeMirror dynamically, and removes `RequireEasyMDE`.
2022-01-05 13:17:25 +01:00
8760af752a Team permission allow different unit has different permission ()
* Team permission allow different unit has different permission

* Finish the interface and the logic

* Fix lint

* Fix translation

* align center for table cell content

* Fix fixture

* merge

* Fix test

* Add deprecated

* Improve code

* Add tooltip

* Fix swagger

* Fix newline

* Fix tests

* Fix tests

* Fix test

* Fix test

* Max permission of external wiki and issues should be read

* Move team units with limited max level below units table

* Update label and column names

* Some improvements

* Fix lint

* Some improvements

* Fix template variables

* Add permission docs

* improve doc

* Fix fixture

* Fix bug

* Fix some bug

* fix

* gofumpt

* Integration test for migration ()

integrations: basic test for Gitea {dump,restore}-repo
This is a first step for integration testing of DumpRepository and
RestoreRepository. It:

runs a Gitea server,
dumps a repo via DumpRepository to the filesystem,
restores the repo via RestoreRepository from the filesystem,
dumps the restored repository to the filesystem,
compares the first and second dump and expects them to be identical

The verification is trivial and the goal is to add more tests for each
topic of the dump.

Signed-off-by: Loïc Dachary <loic@dachary.org>

* Team permission allow different unit has different permission

* Finish the interface and the logic

* Fix lint

* Fix translation

* align center for table cell content

* Fix fixture

* merge

* Fix test

* Add deprecated

* Improve code

* Add tooltip

* Fix swagger

* Fix newline

* Fix tests

* Fix tests

* Fix test

* Fix test

* Max permission of external wiki and issues should be read

* Move team units with limited max level below units table

* Update label and column names

* Some improvements

* Fix lint

* Some improvements

* Fix template variables

* Add permission docs

* improve doc

* Fix fixture

* Fix bug

* Fix some bug

* Fix bug

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Aravinth Manivannan <realaravinth@batsense.net>
2022-01-05 11:37:00 +08:00
8eec403068 Fix bug () 2022-01-03 18:06:46 +02:00
de8e3948a5 Refactor auth package () 2022-01-02 21:12:35 +08:00
e61b390d54 Unify and simplify TrN for i18n ()
Refer: https://github.com/go-gitea/gitea/pull/18135#issuecomment-1003246099

Now we have a unique and simple `TrN`, and make the fix of PR  also use the better `TrN` logic.
2022-01-02 04:33:57 +01:00
qwerty287
7db2f110ad Add API to get issue/pull comments and events (timeline) ()
* Add API to get issue/pull comments and events (timeline)
Adds an API to get both comments and events in one endpoint with all required data.
Closes 

* Fix swagger

* Don't show code comments (use review api instead)

* fmt

* Fix comment

* Time -> TrackedTime

* Use var directly

* Add logger

* Fix lint

* Fix test

* Add comments

* fmt

* [test] get issue directly by ID

* Update test

* Add description for changed refs

* Fix build issues + lint

* Fix build

* Use string enums

* Update swagger

* Support `page` and `limit` params

* fmt + swagger

* Use global slices

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-01-01 22:12:25 +08:00
385dc6a992 Allow admin to associate missing LFS objects for repositories ()
This PR reworked the Find pointer files feature in Settings -> LFS page.

When a LFS object is missing from database but exists in LFS content store, admin can associate it to the repository by clicking the Associate button.

This PR is not perfect (because the LFS module itself should be improved too), it's just a nice-to-have feature to help users recover their LFS repositories (eg: database was lost / table was truncated)
2022-01-01 17:05:31 +08:00
8ce1b539b1 Use conditions but not repo ids as query condition ()
* Use conditions but not repo ids as query condition

* Improve the performance of pulls/issue

* Remove duplicated code

* fix lint

* Fix bug

* Fix stats

* More fixes

* Fix build

* Fix lint

* Fix test

* Fix build

* Adjust the logic

* Merge

* Fix conflicts

* improve the performance

* Add comments for the query conditions functions

* Some improvements
2021-12-29 21:02:12 +08:00
Gusted
e4e3df6c66 Handle invalid issues ()
* Handle invalid issues

- When you hover over a issue reference, and the issue doesn't exist, it
will just hang on the loading animation.
- This patch fixes that by showing them the pop-up with a "Error
occured" message.

* Add I18N

* refactor

* fix comment for lint

* fix unit test for i18n

* fix unit test for i18n

* add comments

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2021-12-28 21:28:27 +08:00
Aravinth Manivannan
c7151c2fb6 - name: new parameter in CreateForkOption to give the forked repository ()
a custom name, intended to be used when there's a name conflict
- When a fork request results in a name conflict, HTTP 409: Conflict is
  returned instead of 500
- API documentation for the above mentioned changes

Signed-off-by: realaravinth <realaravinth@batsense.net>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2021-12-24 22:43:00 +08:00
d7770539f6 Improve interface when comparing a branch which has created a pull request ()
* Improve interface when comparing a branch which has created a pull request

* Take the note back
2021-12-24 12:14:42 +00:00
qwerty287
7cc44491fa Add API to manage repo tranfers () 2021-12-23 23:26:52 -05:00
qwerty287
a9ed1c5c7c Add API to get file commit history ()
Adds an API endpoint `api/v1/repos/{owner}/{repo}/git/history/{filepath}` to get the commits affecting the given file or directory.

Closes https://github.com/go-gitea/gitea/issues/16206 and closes https://github.com/go-gitea/gitea/issues/16703
2021-12-22 06:17:33 +00:00