Commit Graph

2216 Commits (ffff835b7338a25be96df8747a336f07afc49db2)

Author SHA1 Message Date
zeripath f9845454cf Use AppSubUrl for more redirections () ()
Partial backport without changes to locale files.

Fix  - fix misspelling of {{AppSubUrl}} and other misspelling in template
Fixes /explore and organisation redirection
6543 797194d2d0 Fix editor commit to new branch if PR disabled () ()
Elias Norberg e90d88d5d5 Backport of commit status fixes in PR and PR to v1.9 ()
* Use correct index when fetching commit status

Signed-off-by: Elias Norberg <elias@aisle.se>

* Compare against base repo to avoid mismatch when merging from fork

Signed-off-by: Elias Norberg <elias@aisle.se>

* Fix pull request commit status in user dashboard list
jaqra 91ea086ebe [fix ] make show private icon when repo avatar set () ()
Antoine GIRARD c4d8d53a6d Backport: Use vendored go-swagger () ()
* Use vendored go-swagger ()

* Use vendored go-swagger

* vendor go-swagger

* revert un wanteed change

* remove un-needed GO111MODULE

* Update Makefile

Co-Authored-By: techknowlogick <matti@mdranta.net>

* re-generate swagger file
Mario Lubenka 3cc728870a Evaluate emojis in commit messages in list view () ()
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
(cherry picked from commit 08c63190c6)
Lunny Xiao 0793b5e9c0 keep blame view buttons sequence consistent with normal view when view a file () ()
Gary Kim 4d6c8d9b13 backport: Fix adding default Telegram webhook ()
Signed-off-by: Gary Kim <gary@garykim.dev>
Antoine GIRARD 1e2fe9f0b4 gpg/bugfix: Use .ExpiredUnix.IsZero to display green color of forever valid gpg key () ()
* Use .ExpiredUnix.IsZero for display green color of gpg key

* remove useless parentheses
Gary Kim 9b95b41aa8 Prevent Commit Status and Message From Overflowing On Branch Page () ()
Signed-off-by: Gary Kim <gary@garykim.dev>
Lunny Xiao c6f1825fe9 add pagination for admin api get orgs and fix only list public orgs bug () ()
6543 9fbb898058 Show protection symbol if needed on default branch () ()
* backport issue showing portection symbol if needet at default branch

* sugestion to use range .Branches
d57973a804
6543 0a9794a6bc hide delete/restore button on archived repos [backport] ()
* hide delete/restore button on archived repos
close issue 
 * backport vor v1.9

* hide column also

* move protected icon to first colum
backport parts of https://github.com/go-gitea/gitea/pull/7461

* backport comit divergenze fix
https://github.com/go-gitea/gitea/issues/7625
silverwind d6a980501b Fix file header overflow in file and blame views () ()
Richard Mahn 91e24a3a10 Fixes - Handles all redirects for Web UI File CRUD () ()
* Fixes  - Handles all redirects for Web UI File CRUD

* Fixes lint errors

* Typo fix

* Adds unit tests for a few helper functions

* Fixes per review

* Fix for new branch creation and to unit test

* Fixes the template used for errors on delete
Cherrg f52840623c backport of - create class for inline positioned lists ()
see 
affects 

Signed-off-by: Michael Gnehr michael@gnehr.de
silverwind 97d4a38e01 Diff: Fix indentation on unhighlighted code () ()
There was a missing space before the `nohighlight` class which made the
previous class concatenate wrongly as `wrapnohighlight` in the template.
techknowlogick 60ccd87d6e backport - jquery 3 ()
Gary Kim 2477737fff Only show "New Pull Request" button if repo allows pulls () ()
Signed-off-by: Gary Kim <gary@garykim.dev>
Cherrg 362100023c ui - issue view - fix icon position ()
* issue view - fix icon position

- move style from template to css
- add bullets to: key, circle-slash, comment

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* add border to symbols

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* fix circle slash position

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* fix top margin

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* changed mixed space/tab indent to tabindent only

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Cherrg 5b92bc1bec ui - cut timeline length with last element on issue view ()
* cut timeline length with last element on issue view

fix 

- lightly enlight dark theme issue timeline color

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* remove new container

Signed-off-by: Michael Gnehr <michael@gnehr.de>
AJ ONeal 62d6127f1b Make captcha and password optional for external accounts ()
Lunny Xiao 1772c6b94d fix pull view ui merge section ()
* fix pull view ui merge section

* fix tests

* fix tests
Cherrg 9c6af9d2bb wrap long texts on user profile info ()
fix 

discussed in PR 

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Lunny Xiao ff85dd3e12 Add commit statuses reports on pull request view ()
* Add commit statuses reports on pull view

* Add some translations

* improve the UI

* fix fmt

* fix tests

* add a new test git repo to fix tests

* fix bug when headRepo or headBranch missing

* fix tests

* fix tests

* fix consistency

* fix tests

* fix tests

* change the test repo

* fix tests

* fix tests

* fix migration

* keep db size consistency

* fix translation

* change commit hash status table unique index

* remove unused table

* use char instead varchar

* make hashCommitStatusContext private

* split merge section with status check on pull view ui

* fix tests; fix arc-green theme on pull ui
Richard Mahn cd96dee982 Fixes - API File Contents bug ()
Cherrg 711f6dc9b0 Fix 7303 - remove unnessesary buttons on archived repos ()
* archived repo - remove
- open/close button on issue list
- assigne person on issue list

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* archived repo - remove
- comment field on issue view
- lock/unlock issue conversation button from sidebar on issue view

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* archived repo - add 'compare commits' button to pull request

+ remove new pull request button from compare view

as the route is still working, and there is no need to be hidden

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Mario Lubenka 7c0f2b9843 Show Pull Request button or status of latest PR in branch list ()
* Show Pull Request button or status of latest PR in branch list

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Do not show pull request button on deleted branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Do not show commit divergence on deleted branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use XORMs Get instead of limit

* Links pull request ID and use smaller labels for displaying the pull request status

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Handle error when getting latest pull request

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Indent template

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Check error when loading issue

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
silverwind da23041257 fix extra newlines when copying from diff in Firefox ()
* fix extra newlines when copying from diff

See https://bugzilla.mozilla.org/show_bug.cgi?id=1273836

Basically, the <pre><code> seems to add a forced newline that is not
possible to get rid of via CSS, so I replaced it with just a <code>.

Secondly, .lines-type-marker also forced a newline in the copied text,
but that was possible to get rid of via user-select.

Safari still has a extraneous newline in the copied text of unknown
origin, but this should not block stop this PR.

* simplify .line-type-marker

* fix selector

* remove erronous ^^^

* Fix empty split diff

* Fix arc-theme-green

* fix add comment

* ensure line-num is copied too

* Update templates/repo/diff/box.tmpl

Co-Authored-By: zeripath <art27@cantab.net>

* attempt to fix safari via removing <code>

* remove useless whitespace at the end of 'class'

* remove inter-tag whitespace for code <td>s

* more inter-tag removal

* final inter-tag removal

* attempt to fix empty line copy

* move and comment getLineContent

* fix golint

* make background grey for missing added code
zeripath 5908bb1030
Make diff line-marker non-selectable ()
* Make diff line-marker non-selectable
* Move to use data-* as per @mrsdizzie
* fix missing line nums
* Add a minimum-width to force right-align of the line num
* Move line-type-marker into separate column
Lunny Xiao 1e8a616426 show lfs config on admin panel ()
Lunny Xiao d8168b356d
Add missing description of label on API ()
* add missing description of label on API

* fix comment head

* fix swagger
zeripath cf2221e3ac Add LastLogin to the User API ()
silverwind 9ce4d89e99 UI: Fix overflow issues in repo ()
- Fix layout overflow in repo file list.
- Fix invisible status icon in file view and commit list. In file view,
  the icon was moved to the left because I could not figure out a proper
  fix because of HTML tables.
- Added title attribute to commit messages.
- Fixed two CSS linter warnings in existing CSS.
- Fixed CI variable check in 'make css'.

Fixes: https://github.com/go-gitea/gitea/issues/7180
kolaente f9ec2f89f2 Add golangci ()
Richard Mahn 8de0b0a3f0 Fixes - Adds the /git/tags API endpoint ()
* Fixes  - /git/tags API

* proper URLs

* Adds function comments

* Updates swagger

* Removes newline from tag message

* Removes trailing newline from commit message

* Adds integration test

* Removed debugging

* Adds tests

* Fixes bug where multiple tags of same commit show wrong tag name

* Fix formatting

* Removes unused varaible

* Fix to annotated tag function names and response

* Update modules/git/repo_tag.go

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Uses TagPrefix

* Changes per review, better error handling for getting tag and commit IDs

* Fix to getting commit ID

* Fix to getting commit ID

* Fix to getting commit ID

* Fix to getting commit ID
Mario Lubenka 311ce2d1d0 Compare branches, commits and tags with each other ()
* Supports tags when comparing commits or branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Hide headline when only comparing and don't load unused data

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Merges compare logics to allow comparing branches, commits and tags with eachother

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Display branch or tag instead of commit when used for comparing

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Show pull request form after click on button

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Transfers relevant pull.go changes from master to compare.go

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Fixes error when comparing forks against a commit or tag

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes console.log from JavaScript file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Show icon next to commit reference when comparing branch or tag

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Updates css file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Fixes import order

* Renames template variable

* Update routers/repo/compare.go

Co-Authored-By: zeripath <art27@cantab.net>

* Update from master

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Allow short-shas in compare

* Renames prInfo to compareInfo

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Check PR permissions only if compare is pull request

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adjusts comment

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use compareInfo instead of prInfo
Lanre Adelowo de6539fc8c Add state param to milestone listing API ()
* Support state params

* update tests

* fix tests

* add state=all support

* update tests

* update swagger

* update swagger
Mario Lubenka 8eba27c792 Repository avatar fallback configuration ()
* Only show repository avatar in list when one was selected

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adds fallback configuration option for repository avatar

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Implements repository avatar fallback

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adds admin task for deleting generated repository avatars

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Solve linting issues

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Save avatar before updating database

* Linting

* Update models/repo.go

Co-Authored-By: zeripath <art27@cantab.net>
Richard Mahn 43cf2f3b55 Fixes - API Org Visibility ()
Richard Mahn 1831b3b571 Fixes - Adds API Endpoint for Repo Edit ()
* Feature -  - API Endpoint for Repo Editing

* Revert from merge

* Adds integration testing

* Updates to integration tests

* Revert changes

* Update year in file header

* Misspell fix

* XORM = test

* XORM = test

* revert XORM = file

* Makes RepoUnit.ID be pk and autoincr

* Fix to units

* revert header

* Remove print statement

* Adds other responses

* Improves swagger for creating repo

* Fixes import order

* Better Unit Type does not exist error

* Adds editable repo properties to the response repo structure

* Fix to api_repo_edit_test.go

* Fixes repo test

* Changes per review

* Fixes typo and standardizes comments in the EditRepoOption struct for swagger

* Fixes typo and standardizes comments in the EditRepoOption struct for swagger

* Actually can unarchive through the API

* Unlike delete, user doesn't have to be the owner of the org, just admin to the repo

* Fix to swagger comments for field name change

* Update to swagger docs

* Update swagger

* Changes allow_pull_requests to has_pull_requests
Sergey Dryabzhinsky 3fd18838aa Repository avatars ()
* Repository avatars

- first variant of code from old work for gogs
- add migration 87
- add new option in app.ini
- add en-US locale string
- add new class in repository.less

* Add changed index.css, remove unused template name

* Update en-us doc about configuration options

* Add comments to new functions, add new option to docker app.ini

* Add comment for lint

* Remove variable, not needed

* Fix formatting

* Update swagger api template

* Check if avatar exists

* Fix avatar link/path checks

* Typo

* TEXT column can't have a default value

* Fixes:

- remove old avatar file on upload
- use ID in name of avatar file - users may upload same files
- add simple tests

* Fix fmt check

* Generate PNG instead of "static" GIF

* More informative comment

* Fix error message

* Update avatar upload checks:

- add file size check
- add new option
- update config docs
- add new string to en-us locale

* Fixes:

- use FileHEader field for check file size
- add new test - upload big image

* Fix formatting

* Update comments

* Update log message

* Removed wrong style - not needed

* Use Sync2 to migrate

* Update repos list view

- bigger avatar
- fix html blocks alignment

* A little adjust avatar size

* Use small icons for explore/repo list

* Use new cool avatar preparation func by @lafriks

* Missing changes for new function

* Remove unused import, move imports

* Missed new option definition in app.ini

Add file size check in user/profile avatar upload

* Use smaller field length for Avatar

* Use session to update repo DB data, update DeleteAvatar - use session too

* Fix err variable definition

* As suggested @lafriks - return as soon as possible, code readability
Sandro Santilli 9ca7fcddbb "It's all in GitHub" isn't true anymore, update the home template ()
NOTE: this commit only updates the english section
Lunny Xiao f3d87da3e2 Revert "Bugfix: Align comment label and actions to the right ()" ()
This reverts commit 0c432d26fe.
Mario Lubenka 0c432d26fe Bugfix: Align comment label and actions to the right ()
* Bugfix: Align comment label and actions to the right

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Restores relative position

* CSS autofixer
Vladimir Panteleev a98e085031 Show git-notes ()
* Show git-notes

* Make git-notes heading text localizable

* Refactor git-notes data fetching to a separate function

* Display the author and time of git notes

* Move note bubble inside the commit bubble

* Revert "Move note bubble inside the commit bubble"

This reverts commit c0951fe0e3.

* Add test for git-notes

* testing ui

* Polish CSS

* Apply suggestions from code review

Co-Authored-By: Lauris BH <lauris@nix.lv>
Lunny Xiao d5a98a2969 Add support of utf8mb4 for mysql ()
zeripath 56ae539bed SearchRepositoryByName improvements and unification ()
techknowlogick 5fb1ad7011 Webhook Logs show proper HTTP Method, and allow change HTTP method in form ()
* Fix  - logs show proper HTTP Method, and allow change HTTP method
in form

* enforce POST method for webhook

* set default if method is empty
Xaver Maierhofer 95d3d42c5f Fix code overflow ()