6c8ff32511
Add updated_at field to PullReview API object ( #21812 )
...
* Closes #19997
Adds an `updated_at` time field to the `PullReview` API object to
specify when the pull request review's state changed.
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-11-15 11:33:52 +02:00
Yarden Shoham and GitHub
de6dfb7141
Remove href="javascript:;" in "save topics (Done)" button ( #21813 )
...
To use an anchor tag as a button and have it be accessible I added
`role="button" tabindex="0"`,
[reference](https://stackoverflow.com/a/10510353/7414734 ).
* Closes #19912
2022-11-15 10:10:50 +08:00
6f3efdfe11
Render number of commits in repo page in a user friendly way ( #21786 )
...
Use `JsPrettyNumber` to render the number of commits
* Closes #12637
### Before

### After

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: 6543 <6543@obermui.de >
2022-11-13 00:55:19 -05:00
cb83288530
Add attention blocks within quote blocks for Note and Warning ( #21711 )
...
For each quote block, the first `**Note**` or `**Warning**` gets an icon
prepended to it and its text is colored accordingly. GitHub does this
(community/community#16925 ). [Initially requested on
Discord.](https://discord.com/channels/322538954119184384/322538954119184384/1038816475638661181 )
### Before

### After

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: silverwind <me@silverwind.io >
2022-11-09 02:11:26 +02:00
e3a7f15791
Add "Copy" button to file view of raw text ( #21629 )
...
If a raw text file is displayed, a copy button of the text is enabled.
* Closes #12866
### Before

### After

#### Rendered files and binaries have their button disabled


Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2022-11-04 15:33:50 -04:00
5f0cbb3e80
Make rss/atom identifier globally unique ( #21550 )
...
This field should be globally unique.
[RSS
reference](https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt ).
### Before
```xml
<item>
<title>abc opened issue <a href="https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1">abc/defg#1</a> ;</title>
<link>https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1 </link>
<description>1#Colors</description>
<content:encoded><![CDATA[<p><code>#FF0000<span class="color-preview" style="background-color: #FF0000"></span></code></p>
]]></content:encoded>
<author>abc</author>
<guid>2</guid>
<pubDate>Mon, 17 Oct 2022 16:06:08 +0000</pubDate>
</item>
<item>
<title>abc created repository <a href="https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg">abc/defg</a> ;</title>
<link>https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg </link>
<description></description>
<author>abc</author>
<guid>1</guid>
<pubDate>Mon, 17 Oct 2022 16:05:43 +0000</pubDate>
</item>
```
### After
```xml
<item>
<title>abc opened issue <a href="https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1">abc/defg#1</a> ;</title>
<link>https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1 </link>
<description>1#Colors</description>
<content:encoded><![CDATA[<p><code>#FF0000<span class="color-preview" style="background-color: #FF0000"></span></code></p>
]]></content:encoded>
<author>abc</author>
<guid>2: https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1 </guid>
<pubDate>Mon, 17 Oct 2022 16:06:08 +0000</pubDate>
</item>
<item>
<title>abc created repository <a href="https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg">abc/defg</a> ;</title>
<link>https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg </link>
<description></description>
<author>abc</author>
<guid>1: https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg </guid>
<pubDate>Mon, 17 Oct 2022 16:05:43 +0000</pubDate>
</item>
```
* Fixes #21542
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: Lauris BH <lauris@nix.lv >
2022-10-28 09:49:04 -04:00
125e3e3d66
Localize time units on activity heatmap ( #21570 )
...
Previously, the months and days were hardcoded into English
* Closes #15541
## Screenshots
### English

### German

### Spanish

### Italian

### Portuguese
This one has a bit of overflow

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: Gusted <williamzijl7@hotmail.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2022-10-28 09:48:24 -04:00
Yarden Shoham
3bd05172d5
[skip ci] Updated translations via Crowdin
2022-10-25 00:20:58 +00:00
Yarden Shoham and GitHub
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 and GitHub
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
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
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
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 and GitHub
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 and GitHub
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 and GitHub
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
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
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 and GitHub
b5a54f03a2
Fix broken link to frontend guidelines in hacking guidelines ( #21382 )
2022-10-11 21:23:21 -04:00
Yarden Shoham and GitHub
9b7675d0cf
Remove cancel button in repo creation page ( #21381 )
2022-10-11 22:47:35 +08:00
Yarden Shoham and GitHub
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 and GitHub
083ac164dc
Fix missing left and right carets in TRANSLATORS ( #21397 )
2022-10-10 10:36:37 -04:00
Yarden Shoham and GitHub
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