7135 Commits (353282e65880147408382ac4a44473272af53101)
 

Author SHA1 Message Date
silverwind 353282e658 Add autoprefixer to css build (#6029)
* Add autoprefixer to css build

* also use autoprefixer on theme files
5 years ago
Lanre Adelowo d0cb5aa9f9 fix #3200 (#6033) 5 years ago
Lanre Adelowo c71c28eab8 update docs (#6032) 5 years ago
Lanre Adelowo 9d8178b3ac Add option to close issues via commit on a non master branch (#5992)
* fixes #5957

* add tests to make sure config option is respected

* use already defined struct

* - use migration to make the flag repo wide not for the entire gitea instance
Also note that the config value can still be set so as to be able to control the value for new repositories that are to be created

- fix copy/paste error in copyright header year and rearrange import

- use repo config instead of server config value to determine if a commit should close an issue

- update testsuite

* use global config only when creating a new repository

* allow repo admin toggle feature via UI

* fix typo and improve testcase

* fix fixtures

* add DEFAULT prefix to config value

* fix test
5 years ago
zeripath c0adb5ea8b
Create repository on organisation by default on its dashboard (#6026)
* Create repository on organisation by default on its dashboard
* Only show owners the add new repositories to an organisation button.

Fix #3253

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
Lunny Xiao 820e28c904
Split setting.go as multiple files (#6014)
* split setting.go as multiple files

* fix comments
5 years ago
Lunny Xiao 9e8cc3b18d add default time out for git operations (#6015) 5 years ago
silverwind 681345dc99 UI: Make dashboard navbar and footer full-width (#6013)
* UI: Make dashboard navbar full-width

* more tweaks: full-width footer and consistent padding

* fix page layout causing unneccesary scrollbars on small pages
5 years ago
Lanre Adelowo 3a33742e38 disable git fsck for mirrored repos by default (#6018) 5 years ago
Thomas Loubiou d252d4eb8c Remove extra spaces (#6016) 5 years ago
Paul 8c865f3ce8 Fix metrics auth token detection (#6006)
Signed-off-by: Pauls Barkans <paulsb@gmail.com>
5 years ago
zeripath 11a9ce6a2b Increase the version of less (#6010) 5 years ago
silverwind c3d8fb73dc fix header menu misalignment (#6002) 5 years ago
GiteaBot db58dbabfc [skip ci] Updated translations via Crowdin 5 years ago
Richard Mahn ba91214633 Feature - #3031 - search for org repos (#5986) 5 years ago
Thomas Loubiou 7fb09f035a Fix #5799 - swagger for mergePullRequest (#5996) 5 years ago
Lanre Adelowo 2e85e70e38 Enhance closed PR and Issue status in the list (#6000)
* working version

* Update options/locale/locale_en-US.ini

Co-Authored-By: adelowo <adelowomailbox@gmail.com>

* update templates
5 years ago
GiteaBot f60b1d8fe2 [skip ci] Updated translations via Crowdin 5 years ago
silverwind 4c5b585a6f UI: Make navbar full width (#5998) 5 years ago
silverwind 6606d650fa UI: Fix repo header issues (#5995)
Fixes: https://github.com/go-gitea/gitea/issues/5985
5 years ago
John Olheiser f51e7ed18e Update U2F section defaults (#5994)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Lunny Xiao 01bbf5ea69 Add API to list tags (#5850)
* Add API to list tags

* update dependency gitea sdk vendor

* fix swagger generation

* fix swagger

* add tests

* update code.gitea.io/git vendor
5 years ago
Lunny Xiao 2d213b64d1 use native golang SSH library but ssh-keygen when enable built-in SSH server to remove dependent on that command lines (#5976)
* use native golang SSH library but ssh-keygen when enable built-in SSH server to remove dependent on that command lines

* fix tests and add comment head
5 years ago
Lunny Xiao 06a1739553 fix bug when deleting a linked account will removed all (#5989) 5 years ago
Lanre Adelowo 9dfdf80af0 Expose issue stopwatch toggling via API (#5970) 5 years ago
zeripath cc48c12d8f Fix empty ssh key importing in ldap (#5984) 5 years ago
Monty Taylor 44d6a904d3 Support n as a line highlight prefix (#5987)
We're working on rolling out gitea as a replacement for a fairly
large cgit installation. Part of this involves a metric ton of
mod_rewrite rules so that links people have out in the wild will
still work. Unfortunately, cgit uses #n1 in the url to indicate
a single line highlight, which doesn't get passed to the server
and therefore can't be rewritten.

We've got a local workaround by shoving a script block into a
custom header template, but thought it might be nicer to upstream
a simple patch to support #n as a prefix for single line highlights.
(luckily for simplicity, cgit does not support ranges)

Signed-off-by: Monty Taylor <mordred@inaugust.com>
5 years ago
Richard Mahn da1edbfb79 Feature - Pagination for git tree API (#5838)
* Feature - Pagination for git tree API

* Handles case when page is negative

* Does a for loop over the start and end rather than all entries

* Removed redundent logic

* Adds per_page as a query parameter

* Adds DEFAULT_GIT_TREES_PER_PAGE for settings, ran make fmt

* Fix typo in cheat-sheet en

* Makes page start at 1, generated swagger

* Use updates to SDK

* Updates to use latest sdk

* Updates swagger for tree api

* Adds test for GetTreeBySHA

* Updates per PR reviews

* Updates per PR reviews

* Remove file

* Formatting

* Fix to swagger file

* Fix to swagger

* Update v1_json.tmpl

* Fix to swagger file
5 years ago
GiteaBot 0c840a924a [skip ci] Updated translations via Crowdin 5 years ago
techknowlogick ad059fdbbc
Admin config page mailertype setting option update (#5973)
* Fix #5972
5 years ago
silverwind 0c721fe016 UI: Dashboard tweaks (#5974)
- Don't show divider below heatmap when it's hidden via media-query
- Make divider between user menu adhere to container width
- Remove excessiv margins on heatmap
5 years ago
zeripath f286a5abb4 Allow Macaron to be set to log through to gitea.log (#5667)
* Allow Macaron to be set to log through gitea.log

Fix #4291
5 years ago
Gabriel Silva Simões 3b7f41f9f7 Fix serving of raw wiki files other than .md (#5814)
* Fix serving of raw wiki files other than .md

Closes #4690.
Closes #4395.

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Simplify code at routers/repo/wiki.go

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Add more files to user2/repo1.wiki for testing

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Update macaron to v1.3.2

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Add tests for WikiRaw

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Fix NewResponseWriter usage due to macaron update

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Add raw to reserved wiki names

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
5 years ago
techknowlogick 4a747aef7b
Upgrade alpine to 3.9 (#5909) 5 years ago
silverwind acaf5c96fe UI: Repo header tweaks (#5945)
* UI: Repo header tweaks

- Use basic buttons on the header buttons, matching gogs
- Make 'Manage topic' text smaller, remove margin-left with no topics
present
- Move various inline styles to CSS
- Use flexbox on header title and buttons

* fix indentation

* reverse media query wrapping

* fix inconsisten whitespace
5 years ago
Lanre Adelowo c20034be31 Display the branch name in the commit view (#5950)
* add branch info

* Remove blank lines

* Remove blank lines

* update git dependency
5 years ago
silverwind 2ec9bf9048 UI: Fixes for repo topic editor (#5971)
- Properly hides the edit interface when saving a empty topic list
- Align the Done button with the edit box
5 years ago
GiteaBot 1772893505 [skip ci] Updated translations via Crowdin 5 years ago
techknowlogick 9de871a0f8
add other session providers (#5963) 5 years ago
Lunny Xiao bf4badad1d Pull request conflict files detection (#5951)
* add conflict detection

* test pull request conflict files

* fix detection files number

* fix comments
5 years ago
GiteaBot 680a57ce92 [skip ci] Updated translations via Crowdin 5 years ago
Lanre Adelowo 5390791224 Automatically clear stopwatch on merging a PR (#4327)
* Don't display buttons if there are no notices

* clear stopwatch on merging a PR

* remove redundant gt check

* use ctx.Flash as per @bkcsoft comment

* stop timer on closing issues/PRs too

* updated translation as per review

* redirect to login page after successfully activating account

* remove unrelated changes

* stop timer for issues that are closed via commits too..Not just the 'close' UI button
5 years ago
GiteaBot 5bd594c858 [skip ci] Updated translations via Crowdin 5 years ago
Lanre Adelowo 024871ade6 Add label names as filter in issue search api (#5946) 5 years ago
GiteaBot f21ae12abb [skip ci] Updated translations via Crowdin 5 years ago
zeripath 24a36e84cc Issue 5924 fix compare button (#5929)
* Revert #5877

This unfortunately was not the solution.

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

* Change permission check to create pull requests to CanReadIssuesOrPulls

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
zeripath 01c10a951b
Fix ssh deploy and user key constraints (#1357) (#5939)
1. A key can either be an ssh user key or a deploy key. It cannot be both.
2. If a key is a user key - it can only be associated with one user.
3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different.
4. If a repository is deleted, its deploy keys must be deleted too.

We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints:

- [x] You should not be able to add the same user key as another user
- [x] You should not be able to add a ssh user key which is being used as a deploy key
- [x] You should not be able to add a ssh deploy key which is being used as a user key
- [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode.
- [x] If you delete a repository you must delete all its deploy keys.

Fix #1357
5 years ago
Lanre Adelowo 634cbaad2b show user who created the repository instead of the organization in action feed (#5948) 5 years ago
Lanre Adelowo 746cf22d8a handle milestone events for issues and PR (#5947) 5 years ago
zeripath 13c0f7dfff
Fix notifications on pushing with deploy keys by setting hook environment variables (#5935)
The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed.

I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key.

There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR.

Fix #3795 

Signed-off-by: Andrew Thornton art27@cantab.net
5 years ago