Commit graph

10007 commits

Author SHA1 Message Date
techknowlogick
e6c9f19b8f
Use url.Parse to parse hostname (#12335) 2020-07-26 20:16:22 -04:00
6543
7ecb25b41b
Refactor: Remove Dependencies from Migration v111 (#11646)
* Refactor: Remove Dependencys from Migration v111

* Update models/migrations/v111.go

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-26 17:34:30 -04:00
Wim
4609eba2e7
Fix ipv6 parsing (#12321)
* Fix ipv6 parsing

* Update modules/setting/setting.go

Co-authored-by: 6543 <6543@obermui.de>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-26 16:31:28 -04:00
赵智超
415fc8288f
Show 404 page when release not found (#12328)
Signed-off-by: a1012112796 <1012112796@qq.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-07-26 15:00:48 -04:00
GiteaBot
d0c690f160 [skip ci] Updated translations via Crowdin 2020-07-26 09:49:14 +00:00
silverwind
7cf23399a0
Rework 'make generate-images' (#12316)
* Rework 'make generate-images'

- Remove external dependencies and replace it with a node script that
  does does the same.
- Move detail removal from gitea-sm.png to favicon.png
- Remove favicon.ico and its generation, it is unused and we already serve
  favicon.png in its place.

Fixes: https://github.com/go-gitea/gitea/issues/12314

* use proper centering value for preserveAspectRatio

* fix lint

* use fabric

* better linting fix

* fix typo

* mention detail-remove class in docs
2020-07-26 17:47:51 +08:00
mrsdizzie
ea1ed802a3
Fix emoji detection in certain cases (#12320)
* Fix emoji detection certain cases

Previous tests weren't complicated enough so there were some situations where emojis were't detected properly. Find the earliest occurance in addition to checking for the longest combination.

Fixes #12312

* ok spell bot

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-25 16:40:04 +03:00
silverwind
8baf5ca228
Reduce emoji size (#12317)
* Reduce emoji size

Rendering should now pretty much match GitHub with 1.25em. I verified
that emojis don't increase the line height and removed unecessary size
overrides because now all emojis should appear similar in relation to
the font size.

* fix reaction hover
2020-07-25 12:55:34 +03:00
silverwind
a3afb88f1b
Remove unused svg and improve 'make svg-check' (#12311)
- Remove unused source SVG gitea-settings (it was changed to ociticon)
- Improve 'make svg-check' to also detect added files
2020-07-24 19:41:30 +03:00
赵智超
7744b36e56
Use a small size repo for migrate test (#12300)
Signed-off-by: a1012112796 <1012112796@qq.com>
2020-07-24 12:46:38 +08:00
silverwind
0186497e67
Fix input box value access on repo create (#12299)
Followup to https://github.com/go-gitea/gitea/pull/12202
2020-07-23 11:59:03 -04:00
Alexander Scheel
4497db96e0
Auto-init repo on license, .gitignore select (#12202)
* Auto-init repo on license, .gitignore select

When a .gitignore or LICENSE file is added, the user is expecting the
repository to be auto-initialized. However, nothing sets the auto_init
value, so it remains at its default. We should set it to checked when
a .gitignore or LICENSE file is added, matching user expectations. If
the user clears .gitignore or LICENSE, it will leave repository creation
enabled. If the user changes the value again, it will re-check the box
if the user has since de-checked it. This behavior is at least
consistent.

Resolves: #11071

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-23 13:46:41 +03:00
zeripath
d25f44285a
Fix double-indirection bug in logging IDs (#12294)
This PR fixes a bug in log.NewColoredIDValue() which led to a double
indirection and incorrect IDs being printed out.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-07-23 12:26:45 +03:00
6543
2753d72773
Migrations (v82,v96,v99,v136) remove dependencies (#12286)
* remove dependencys

* add missing fields

* CI.restart()
2020-07-22 09:27:22 -05:00
Alexander Scheel
8e20daaede
Clarify documentation of SKIP_VERIFY (#12203)
* Clarify documentation of SKIP_VERIFY

The documentation clearly documents the empty value as the default,
however at least one user reported this as being unclear. Mark values
explicitly so it is clear what values it can take. This clarifies that
an empty value in fact leaves certificate verification enabled, whereas
it has to be explicitly set to true to disable certificate verification.

Resolves: #12117

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update custom/conf/app.example.ini

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update custom/conf/app.example.ini

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-21 19:50:25 -04:00
techknowlogick
366ca88eea
merge docker makefile into main one (#12289)
* merge docker makefile into main one

* add readme for docker folder

* don't include a file that doesn't exist anymore

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-21 16:41:03 -04:00
GiteaBot
d489def5ed [skip ci] Updated translations via Crowdin 2020-07-21 12:29:30 +00:00
Lunny Xiao
45631083a4
Support use nvarchar for all varchar columns when using mssql (#12269)
* Support use nvarchar for all varchar columns when using mssql

* fix lint

* Change DEFAULT_VARCHAR to nvarchar

* Remove the config for default varchar since it's unnecessary
2020-07-21 20:28:27 +08:00
GiteaBot
ed8e064f5e [skip ci] Updated translations via Crowdin 2020-07-19 09:54:41 +00:00
Stephen Solka
54513452a1
prefer NoError/Error over Nil/NotNil (#12271) 2020-07-19 12:53:40 +03:00
Alan Pope
b609a25014
Add logic to build stable and edge builds (#12052)
This adds some logic to enable the snapcraft builds of the gitea snap to create both builds of the latest tip of master for edge channels, and stable releases.

The logic simply looks for a new upstream release in github, and if that latest tagged release is not the same as the release in the candidate channel in the snap store, then it must be new, and so we checkout that tag and build that. If the current released tag is the same as what's in candidate, we build whatever is in git master.

The process for using this is:

Initially: When this lands, it will build the latest stable release of gitea and push to the edge channel in the snap store. Someone on the release team can go to https://snapcraft.io/gitea/releases and release that build to stable and candidate.

Ongoing: The next build to be triggered will be a git master build, and can just sit in edge, nothing for the release team to do.

On new release: The next build triggered will contain the stable release, and will be published to edge. Someone on the release team can login to the above URL and release that again to stable & candidate. Alternatively they can release to candidate, do some additional testing on that release before releasing to stable.

Hope that all makes sense. Questions / comments welcome.

I'm super keen to see stable releases of Gitea in the stable channel of the Snap Store. I'd like to promote it but I can't really until it's in stable.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-17 13:27:00 -04:00
silverwind
0e24af6951
Update Octicons to v10 (#12240)
* Update Octicons to v10

Besides a few renames, these icons are no longer present in v10 that we've
used, so had to change:

file-symlink-directory -> file-submodule
internal-repo -> repo
repo-force-push -> repo-push
repo-template-private -> repo-template

Fixes: https://github.com/go-gitea/gitea/issues/11889
Ref: https://github.com/primer/octicons/releases/tag/v10.0.0

* add custom sliders svg for removed octicon-settings

* apply suggestion

* fix triangles and use play on admin dashboard

* add custom mirror svg

* add missing build files

* unify custom svgs

* move to octicon-repo-clone to gitea-mirror

* use octicon-x on conflicts

* tweak timeline icons

* tweak comment buttons

* update settings icon to octicons v1

* switch to octicon-mirror and octicon-tools

* replace two wiki buttons with octicons

* remove whitespace in svg sources

* Fix filepath basename on Windows for SVG bindata (#12241)

* move octicons to devDependencies

* move back to dependencies

* move svgo to devDependencies again

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-17 18:15:12 +03:00
zeripath
4fa2e217c1
Set NoAutoTime when updating is_archived (#12266)
Fix #12246

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-16 17:58:46 -04:00
zeripath
3bcc6e7a9e
Ensure that git commit tree continues properly over the page (#12142)
* Ensure that git commit tree continues properly over the page

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

* Avoid generating strings when skipping

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

* skip initial non-commit-lines

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-16 15:24:36 -04:00
Bagas Sanjaya
07c4ed4cda
[Docs] Logging Configuration - Use logrotate Instead (#9930)
* Logging Configuration - Add logrotate

* Delete instead duplicate

* Apply suggestions from @jolheiser

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Quote false

* Replace program with utility

* Whoops, use --debug switch instead

* Optional immediate reload by --force switch

* Update docs/content/doc/advanced/logging-documentation.en-us.md

Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
2020-07-16 12:02:29 -04:00
赵智超
0122cf9cdc
[ui] Link to pr list page on sidebar when view pr (#12256)
Fix #12254

Signed-off-by: a1012112796 <1012112796@qq.com>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-16 11:07:13 -04:00
mrsdizzie
9542b7317d
Fix Syntax highlight for token change in added/deleted code (#12238)
* Fix Syntax highlight for token change in added/deleted code

For diffs we first syntax highlight the before and after line then use a 3rd party diff library to find the difference in them and create a substring based on that, which we then highlight a 2nd time to show the specific difference within a line that has changed. In a specific case if the diffrence also changes the chroma class it will split in the middle of the attr and cause broken HTML:

```
<span class="nx">oldtext<span>
<span class="k">var newtext<span>
```

Will then split on

```
<span class="
```

Where the difference starts, and produce something broken like:

```
<span class="<span class="removed-code">nx"oldtext</span></span

```

Fix that by detecting when it happens and putting the HTML back together properly before highlighting the added/deleted code.

Fixes #12235

* fix lint

* apply fix to all diff sections. Also handle case where insert/remove starts with a closing span

* Add a test for this new code

* remove comment

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-16 16:58:54 +03:00
techknowlogick
6ea2701cd9
Release docs as archive (#12253)
It is ok to use go modules at this point as release-source make target has already been run. Otherwise hugo fails to build. Example of failed build: https://drone.gitea.io/go-gitea/gitea/27976/5/3

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-15 22:39:45 +01:00
Tchoupinax
fd9e8951d8
fix: add type=text for user_name (password manager) (#12250)
* fix: add type=text for user_name (password manager)

* Update templates/user/auth/reset_passwd.tmpl

Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>

Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
2020-07-15 16:48:50 +03:00
GiteaBot
670db99f4f [skip ci] Updated translations via Crowdin 2020-07-15 04:38:43 +00:00
Lauris BH
bae5293d24
Show drone status for master branch in README (#12248) 2020-07-15 12:37:38 +08:00
Ben Harris
a4da46d182
Use correct make target for building static assets (#12247)
The webpack make target does not build semantic-ui
2020-07-14 15:45:23 -04:00
GiteaBot
3b498ebc77 [skip ci] Updated translations via Crowdin 2020-07-14 02:10:41 +00:00
Antoine GIRARD
b92a5d8d64
release docs as an archive (#12243)
* release docs along sources

* use a custom offline version

Co-authored-by: Gitea <gitea@fake.local>
2020-07-13 22:09:39 -04:00
Cirno the Strongest
633f52c220
Fix filepath basename on Windows for SVG bindata (#12241) 2020-07-13 21:16:40 +01:00
silverwind
84a419de98
Replace code fold icons with octicons (#12222)
- replace font-awesome icons with octicons
- clean up js and css surrounding the code expansion and file folding
- fix hover color on arc-green
- tweak diff line number colors

Co-authored-by: zeripath <art27@cantab.net>
2020-07-13 16:21:19 +03:00
Lars Lehtonen
b49a195839
models: fix xorm variable clobber (#12231)
NewTestEngine() takes a *xorm.Engine as its argument, and then immediately overwrites it.

This fixes the model package to not take an unneeded variable, and changes the routers package to not create a nil *xorm.Engine that is immediately discarded by model.
2020-07-13 09:58:55 +01:00
silverwind
48ad76c25e
Fix repolist icons (#12228)
Fixes: https://github.com/go-gitea/gitea/issues/12226
2020-07-13 02:48:48 +03:00
mrsdizzie
a60f506dd7
Syntax highlight expanded code blobs (#12223)
Expanded code in diffs wasn't being highlighted properly because it wasn't passing the filename to highlighting code.

Fixes #12218
2020-07-12 21:25:05 +03:00
bobemoe
bac57ab590
When starting new stopwatch stop previous if it is still running (#10533)
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-07-12 13:01:20 +03:00
silverwind
8188176b58
Direct SVG rendering (#12157)
Introduce 'make svg' which calls a node script that compiles svg files
to `public/img/svg`. These files are vendored to not create a dependency
on Node for the backend build.

On the frontend side, configure webpack using `raw-loader` so SVGs can
be imported as string.

Also moved our existing SVGs to web_src/svg for consistency.

Fixes: https://github.com/go-gitea/gitea/issues/11618
2020-07-12 12:10:56 +03:00
zeripath
63591016b3
Extend Notifications API and return pinned notifications by default (#12164)
* Extend notifications API and return pinned notifications in notifications list

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

* fix swagger

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

* Fix swagger again

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

* fix test

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

* remove spurious debugs

* as per @6543

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

* Update models/notification.go

* as per @6543

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-12 00:46:01 +03:00
Lunny Xiao
d08996c7b9
Upgrade xorm to v1.0.3 (#12210)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-11 17:07:52 -04:00
6543
3973a4609e
Frontport Changelog of v1.12.2 (#12216)
* Changelog for v1.12.2 (#12214)

* Changelog for v1.12.2

* Update CHANGELOG.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update CHANGELOG.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update CHANGELOG.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update CHANGELOG.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update CHANGELOG.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update CHANGELOG.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update CHANGELOG.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update CHANGELOG.md

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* update docs

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
2020-07-11 16:28:23 -04:00
mrsdizzie
8d081950e6
Ensure syntax highlighting is the same inside diffs (#12205)
Make sure to end up with the same syntax highlighting inside various sections of diffs by processing the code first before detecting specific changes between the lines. Also try and make sure that when highlighting individual lines in a diff that it is tokenized the same as it would be when part of an entire file with more context.

Fixes: #12190
2020-07-11 13:43:12 +08:00
GiteaBot
6a62884782 [skip ci] Updated translations via Crowdin 2020-07-09 21:14:09 +00:00
6543
16980d13ce
Default to showing closed Issues/PR list when there are only closed issues/PRs (#12200)
If all issues are closed, then set the default to show the closed issues.
2020-07-09 22:13:06 +01:00
mrsdizzie
a6168fa25d
Make copy/paste work for source code (#12191)
* Make copy/paste work for source code

Fix regression casued by #12047 so copy/paste works properly in all browsers.

Fixes #12184

Also while looking at this I saw a small display issue for blame view. I think #12023 was merged into original PR through an update branch before #12047 was merged and made one of the css ruules not apply anymore.

* use pseudo-element to prevent copying of comment + symbol even when not visually selected

* remove added newline here should not be necessary anymore

* make sure empty line is newline so there is something to select and copy
2020-07-08 22:02:38 +01:00
Kristian Antonsen
cedbd3684f
Fix regression: Gitea commits API again returns commit summaries, not full messages (#12186)
Closes #12185
2020-07-08 14:53:09 +01:00
silverwind
dbd5e4bb8d
Update JS dependencies (#12181)
- Update all dependencies excluding octicons
- Configure new eslint 7.3.0 rules

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-08 09:47:05 +08:00