Yarden Shoham and yp05327
638fbd0b78
add default user visibility to cli command "admin user create" ( #22750 ) ( #22760 )
...
Backport #22750
Fixes https://github.com/go-gitea/gitea/issues/22523
Co-authored-by: yp05327 <576951401@qq.com >
2023-02-08 11:04:38 -06:00
3647e62ef9
Fix color of tertiary button on dark theme ( #22739 ) ( #22744 )
...
Backport #22739
Before:
<img width="266" alt="Screenshot 2023-02-03 at 14 07 34"
src="https://user-images.githubusercontent.com/115237/216611151-92e98305-c4b5-42f3-b2e2-8b1b805fa644.png ">
After:
<img width="271" alt="Screenshot 2023-02-03 at 14 07 52"
src="https://user-images.githubusercontent.com/115237/216611156-878a8a75-39a1-415b-9b6d-4f035985444e.png ">
This is the only instance of such a button in all templates.
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-08 23:44:40 +08:00
Yarden Shoham and wxiaoguang
37bbf2c902
Fix restore repo bug, clarify the problem of ForeignIndex ( #22776 ) ( #22794 )
...
Backport #22776
Fix #22581
TLDR: #18446 made a mess with ForeignIndex and triggered a design
flaw/bug of #16356 , then a quick patch #21271 helped #18446 , then the
the bug was re-triggered by #21721 .
Related:
* #16356
* BasicIssueContext
https://github.com/go-gitea/gitea/pull/16356/files#diff-7938eb670d42a5ead6b08121e16aa4537a4d716c1cf37923c70470020fb9d036R16-R27
* #18446
* If some issues were dumped without ForeignIndex, then they would be
imported as ForeignIndex=0
https://github.com/go-gitea/gitea/pull/18446/files#diff-1624a3e715d8fc70edf2db1630642b7d6517f8c359cc69d58c3958b34ba4ce5eR38-R39
* #21271
* It patched the above bug (somewhat), made the issues without
ForeignIndex could have the same value as LocalIndex
* #21721
* It re-triggered the zero-ForeignIndex bug.
ps: I am not sure whether the changes in `GetForeignIndex` are ideal (at
least, now it has almost the same behavior as BasicIssueContext in
#16356 ), it's just a quick fix. Feel free to edit on this PR directly or
replace it.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-02-08 08:39:42 +00:00
Yarden Shoham
965376d476
use drone secrets for s3 config ( #22770 ) ( #22773 )
2023-02-05 18:42:45 -05:00
Yarden Shoham and zeripath
4c20be7c00
Add missing close bracket in imagediff ( #22710 ) ( #22712 )
...
Backport #22710
There was a missing `]` in imagediff.js:
```
const $range = $container.find("input[type='range'");
```
This PR simply adds this.
Fix #22702
Co-authored-by: zeripath <art27@cantab.net >
2023-02-01 12:30:52 +00:00
Yarden Shoham and Lunny Xiao
263d06f616
Fix wrong hint when deleting a branch successfully from pull request UI ( #22673 ) ( #22698 )
...
Backport #22673
Fix #18785
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-01 01:35:38 +00:00
Yarden Shoham and Felipe Leopoldo Sologuren Gutiérrez
6be1d71e2b
Link issue and pull requests status change in UI notifications directly to their event in the timelined view. ( #22627 ) ( #22642 )
...
Backport #22627
Adding the related comment to the issue and pull request status change
in the UI notifications allows to navigate directly to the specific
event in its dedicated view, easing the reading of last comments and to
the editor for additional comments if desired.
Co-authored-by: Felipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com >
2023-01-28 15:51:00 +00:00
Yarden Shoham
9f5e44bf50
Use --index-url in PyPi description ( #22620 ) ( #22636 )
2023-01-28 12:57:12 +08:00
Yarden Shoham and Sybren
f204ff4ef7
Prevent duplicate labels when importing more than 99 ( #22591 ) ( #22598 )
...
Backport #22591
Importing labels (via `gitea restore-repo`) did not split them up into
batches properly. The first "batch" would create all labels, the second
"batch" would create all labels except those in the first "batch", etc.
This meant that when importing more than 99 labels (the batch size)
there would always be duplicate ones.
This is solved by actually passing `labels[:lbBatchSize]` to the
`CreateLabels()` function, instead of the entire list `labels`.
Co-authored-by: Sybren <122987084+drsybren@users.noreply.github.com >
2023-01-24 14:48:21 -06:00
6068978c42
Prevent multiple To recipients ( #22566 ) ( #22569 )
...
Backport #22566
Change the mailer interface to prevent the leaking of possible hidden
email addresses when sending to multiple recipients.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
Co-authored-by: Gusted <williamzijl7@hotmail.com >
2023-01-22 11:37:26 -06:00
Yarden Shoham
c320caed97
Truncate commit summary on repo files table. ( #22551 ) ( #22552 )
...
Backport #22551
There was an unintended regression in #21124 which assumed that
.commits-list .message-wrapper would only match the commit summaries on
/{owner}/{name}/commits/*. This assumption is incorrect as the
directory/file view also uses a .commits-list wrapper.
Rather than completely restructure this page this PR simply adjusts the
styling to again use display: inline-block; for #repo-files-table
.commit-list .message-wrapper
Fix #22360
2023-01-20 23:34:52 +08:00
Yarden Shoham
45bdeac730
Fix pull request API field closed_at always being null ( #22482 ) ( #22483 )
...
Backport #22482
Fix #22480
2023-01-17 11:41:43 +00:00
Yarden Shoham
885082f7a7
Don't display stop watch top bar icon when disabled and hidden when click other place ( #22374 ) ( #22387 )
...
Backport #22374
Fix #22286
When timetracking is disabled, the stop watch top bar icon should be
hidden. When the stop watch recording popup, it should be allowed to
hide with some operation. Now click any place on this page will hide the
popup window.
2023-01-10 09:21:29 +00:00
Yarden Shoham
72d1f9e63e
Fix due date rendering the wrong date in issue ( #22302 ) ( #22306 )
...
Backport #22302
Previously, the last minute of the chosen date caused bad timezone
rendering.
For example, I chose January 4th, 2023.
### Before
```html
<time data-format="date" datetime="Wed, 04 Jan 2023 23:59:59 +0000">January 5, 2023</time>
```
### After
```html
<time data-format="date" datetime="2023-01-04">January 4, 2023</time>
```
---
Closes #21999
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
2023-01-02 20:42:39 +08:00
Yarden Shoham
3bd05172d5
[skip ci] Updated translations via Crowdin
2022-10-25 00:20:58 +00:00
Yarden Shoham
fc1048a411
Add sqlite vscode extension to Gitpod configuration ( #21552 )
...
It allows for quick database inspections in the IDE.

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
2022-10-24 16:55:59 -04:00
Yarden Shoham
c04ad7632f
Use recommended vscode configuration in gitpod environments ( #21537 )
...
To make go tests run in gitpod, the vscode settings.json must be in the
correct place in the filesystem
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
2022-10-24 02:24:33 +01:00
Yarden Shoham and Lauris BH
578b43ddb5
Add yardenshoham to maintainers ( #21566 )
...
[List of merged
PRs](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3Ayardenshoham+is%3Amerged )
(with many more on the way!)
Co-authored-by: Lauris BH <lauris@nix.lv >
2022-10-23 12:09:21 -04:00
88a03a6133
Link mentioned user in markdown only if they are visible to viewer ( #21554 )
...
We need to make sure a user can't confirm the existence of a user with
private visibility
* Follow up on #21533
### Before
#### User

#### Admin

### After
#### User

#### Admin

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-10-23 17:13:52 +08:00
63ebb53fd5
Add link to user profile in markdown mention only if user exists ( #21533 )
...
Previously mentioning a user would link to its profile, regardless of
whether the user existed. This change tests if the user exists and only
if it does - a link to its profile is added.
* Fixes #3444
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-10-23 01:15:52 +08:00
Yarden Shoham and Lunny Xiao
2c77d4b195
Remove unnecessary debug log ( #21536 )
...
It distractingly shows up on unit tests
* Looks like a leftover from #20571
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-10-22 15:25:34 +08:00
e828564445
Add color previews in markdown ( #21474 )
...
* Resolves #3047
Every time a color code will be in \`backticks`, a cute little color
preview will pop up
[Inspiration](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#supported-color-models )
#### Before

#### After

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-10-21 20:00:53 +08:00
acdb92ad42
Localize all timestamps ( #21440 )
...
Following
* #21410
We are now able to localize all timestamps. Some examples:
`short-date` format, French, user profile page:

`date-time` format, Portuguese, mirror repository settings page:

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: Gusted <williamzijl7@hotmail.com >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-10-17 12:08:21 +08:00
Yarden Shoham and 6543
bc53256316
Use own Go version instead of hardcoded 1.17 for make fmt ( #21457 )
...
We should make sure we're using the same version across the codebase.
* We upgraded in #19918 but forgot about the following line
https://github.com/go-gitea/gitea/blob/6bb6a108e0c03b323402b452fc05c6845f7d00df/build/code-batch-process.go#L273
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: 6543 <6543@obermui.de >
2022-10-15 21:10:25 +01:00
b9cd6fb703
Add code highlighting in issue titles ( #21432 )
...
This changes the rendering logic of issue titles. If a substring in an
issue title is enclosed with a pair of backticks, it'll be rendered with
a monospace font (HTML `code` tag).
* Closes #20887
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: Gusted <williamzijl7@hotmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: 6543 <6543@obermui.de >
2022-10-16 02:24:41 +08:00
671c609c46
Add wording about keeping PRs up-to-date in CONTRIBUTING.md ( #21468 )
...
Following a discord discussion from today I've written the policy
explained to me about keeping PRs up-to-date.
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2022-10-15 12:41:24 -04:00
Yarden Shoham
7917123209
[skip ci] Updated translations via Crowdin
2022-10-15 00:21:30 +00:00
Yarden Shoham
94d6d93cc2
Fix Drone pushing commits with wrong author info ( #21450 )
...
I don't know how to test this so I'll explain my thought process:
After a discussion with @techknowlogick in
https://github.com/go-gitea/gitea/commit/cda2c38f4a61ef7f448be3efab5420d9974c8474
I saw the CI config has this block:
https://github.com/go-gitea/gitea/blob/cda2c38f4a61ef7f448be3efab5420d9974c8474/.drone.yml#L618-L630
I don't know much about Drone but after looking at
[appleboy/drone-git-push](https://github.com/appleboy/drone-git-push )'s
source code, I think each setting becomes an environment variable (e.g.
`remote` to `PLUGIN_REMOTE`, `commit_message` to `PLUGIN_COMMIT_MESSAGE`
etc...). Take a look at the code block loading the author info:
https://github.com/appleboy/drone-git-push/blob/a69878c00665277c53fb38d6c5980221cb687935/main.go#L32-L42
Two environment variables are listed for each setting. This PR forces
both to have the same value.
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
2022-10-14 15:09:04 -04:00
Yarden Shoham
6bb6a108e0
Add vitest tests to Gitpod ( #21449 )
...
The vitest PR is merged, we can now add vitest to Gitpod's testing pane
* #21444
We couldn't use jest in the same manner because we had to customize
`NODE_OPTIONS`.
Screenshot (look at all the cool stuff circled in red):

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
2022-10-14 11:22:57 -04:00
Yarden Shoham
c4f7c96903
Run make fmt ( #21437 )
...
The only change is what `make fmt` did, I am merely a vessel for its
glorious function
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
2022-10-13 21:33:54 -04:00
Yarden Shoham
cda2c38f4a
[skip ci] Updated translations via Crowdin
2022-10-13 00:21:26 +00:00
Yarden Shoham and silverwind
6a6dc97b0f
Respect user's locale when rendering the date range in the repo activity page ( #21410 )
...
# Description
Previously, to make the date range understood by all, we used the format
"2006-01-02" for the dates as it's locale-generic.
This commit changes the rendering logic. Instead of rendering the date
on the server, we send a formatted computer-readable timestamp. The
client's javascript then renders it according to the user's locale.
This approach is reusable across the codebase, any `<time></time>` tag
with the data-format="date" attribute would get rendered according to
the user's chosen locale.
## Previous View

## New View
### English

### French

### Portuguese

### Italian

# References
* #21380
* #21387
* #21396
Inspiration:
I think either differentiating by class, or probably better by a custom
attribute such as `data-format` or similar, is the best course of
action.
_Originally posted by @delvh in
https://github.com/go-gitea/gitea/issues/21396#issuecomment-1274424788_
Resolves #21380
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2022-10-13 00:14:14 +03:00
Yarden Shoham and Gusted
b474730cf6
Refactor Gitpod configuration to improve quick spin up of automated dev environments ( #21411 )
...
This commit instructs Gitpod to run `docs` in watch mode in fresh
development environments so any dev could start hacking in seconds.
Also included some vscode extensions for Vue, Go, and Docker.
Try it here:
[](https://gitpod.io/#https://github.com/yardenshoham/gitea/tree/gitpod )
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: Gusted <williamzijl7@hotmail.com >
2022-10-12 12:17:04 -04:00
Yarden Shoham
b5a54f03a2
Fix broken link to frontend guidelines in hacking guidelines ( #21382 )
2022-10-11 21:23:21 -04:00
Yarden Shoham
9b7675d0cf
Remove cancel button in repo creation page ( #21381 )
2022-10-11 22:47:35 +08:00
Yarden Shoham
2d4c6321c3
Use ISO date format instead of hard-coded English date format for date range in repo activity page ( #21396 )
...
January 2, 2006 -> 2006-01-02
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
2022-10-11 18:48:17 +08:00
Yarden Shoham
083ac164dc
Fix missing left and right carets in TRANSLATORS ( #21397 )
2022-10-10 10:36:37 -04:00
Yarden Shoham
97f3f1988b
Fix typos in PullRequestMergeForm.vue header comment ( #21378 )
...
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
2022-10-09 15:17:01 +08:00