* moved avatar to profile page
* combined password change, email and account deletion into account settings page
* combined totp, access tokens, linked accounts and openid into security settings page
* move access tokens to applications settings page
* small change to restart drone build
* fix change avatar url on profile page
* redirect old settings urls to new ones
* enforce only one autofocus attribute on settings pages
* set correct redirect status code
* fmt fix
* Added user language setting
* Added translation string for setting
* Fixed import order + typo
* improved checking if the user has a language saved in the db
* The current saved language is now set a default inside the dropdown
* fmt
* When a user signs in and doesn't have a language saved, the current browser language is saved
* updated gitea-sdk
* Merge branch 'master' of https://github.com/go-gitea/gitea into save-user-language
# Conflicts:
# models/migrations/migrations.go
# models/migrations/v62.go
* Made tests work again
* trigger CI
* trigger CI
* fmt
* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO
* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO
* When loggin in, only the language col gets updated instead of everything
* Started adding deadline to ui
* Implemented basic issue due date managing
* Improved UI for due date managing
* Added at least write access to the repo in order to modify issue due dates
* Ui improvements
* Added issue comments creation when adding/modifying/removing a due date
* Show due date in issue list
* Added api support for issue due dates
* Fixed lint suggestions
* Added deadline to sdk
* Updated css
* Added support for adding/modifiying deadlines for pull requests via api
* Fixed comments not created when updating or removing a deadline
* update sdk (will do properly once go-gitea/go-sdk#103 is merged)
* enhanced updateIssueDeadline
* Removed unnessecary Issue.DeadlineString
* UI improvements
* Small improvments to comment creation
+ ui & validation improvements
* Check if an issue is overdue is now a seperate function
* Updated go-sdk with govendor as it was merged
* Simplified isOverdue method
* removed unessecary deadline to 0 set
* Update swagger definitions
* Added missing return
* Added an explanary comment
* Improved updateIssueDeadline method so it'll only update `deadline_unix`
* Small changes and improvements
* no need to explicitly load the issue when updating a deadline, just use whats already there
* small optimisations
* Added check if a deadline was modified before updating it
* Moved comment creating logic into its own function
* Code cleanup for creating deadline comment
* locale improvement
* When modifying a deadline, the old deadline is saved with the comment
* small improvments to xorm session handling when updating an issue deadline
+ style nitpicks
* style nitpicks
* Moved checking for if the user has write acces to middleware
* Show total tracked time in issue and milestone list
Show total tracked time at issue page
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Optimizing TotalTimes by using SumInt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fixing wrong total times for milestones caused by a missing JOIN
Adding unit tests for total times
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Logging error instead of ignoring it
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Correcting spelling mistakes
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Change error message to a short version
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add error handling to TotalTimes
Add variable for totalTimes
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Introduce TotalTrackedTimes as variable of issue
Load TotalTrackedTimes by loading attributes of IssueList
Load TotalTrackedTimes by loading attributes of single issue
Add Sec2Time as helper to use it in templates
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fixed test + gofmt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Load TotalTrackedTimes via MilestoneList instead of single requests
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add documentation for MilestoneList
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add documentation for MilestoneList
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix test
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Change comment from SQL query to description
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix unit test by using int64 instead of int
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix unit test by using int64 instead of int
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Check if timetracker is enabled
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix test by enabling timetracking
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* add topic models and unit tests
* fix comments
* fix comment
* add the UI to show or add topics for a repo
* show topics on repositories list
* fix test
* don't show manage topics link when no permission
* use green basic as topic label
* fix topic label color
* remove trace content
* remove debug function
New Feature:
* Repository struct field for IsFsckEnabled (default true of course)
* Admin Settings section on repo options page, accessible only by
admin users
Possible Enhancements:
* There's no way to force running health checks on all repos
regardless of their IsFsckEnabled setting. This would be useful if
there were an admin API or dashboard button to run fsck immediately.
Issue: https://github.com/go-gitea/gitea/issues/1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
* add global code search on explore
* fix bug when no anyone public repos
* change the icon
* fix typo and add UnitTypeCode check for login non-admin user
* fix ui description when no match
* Added checks for protected branches in pull requests
Signed-off-by: Christian Wulff <NChris@posteo.net>
* Moved check for protected branch into new function CheckUserAllowedToMerge
Signed-off-by: Christian Wulff <NChris@posteo.net>
* Removed merge conflict lines from last commit
Signed-off-by: Christian Wulff <NChris@posteo.net>
* Explicit check for error type in ViewIssue
Signed-off-by: Christian Wulff <NChris@posteo.net>
* Add Attachment API
* repos/:owner/:repo/releases (add attachments)
* repos/:owner/:repo/releases/:id (add attachments)
* repos/:owner/:repo/releases/:id/attachments
* repos/:owner/:repo/releases/:id/attachments/:attachment_id
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Add unit tests for new attachment functions
Fix comments
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* fix lint
* Update vendor.json
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* remove version of sdk
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix unit tests
Add missing license header
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add CreateReleaseAttachment
Add EditReleaseAttachment
Add DeleteReleaseAttachment
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add filename query parameter for choosing another name for an attachment
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix order of imports
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Restricting updatable attachment columns
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* gofmt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Update go-sdk
Replace Attachments with Assets
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Update go-sdk
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Updating go-sdk and regenerating swagger
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add missing file of go-sdk
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Change origin of code.gitea.io/sdk to code.gitea.io/sdk
Update code.gitea.io/sdk
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Update swagger
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Update updateAttachment
Include both a log entry and the blocked mime type in the gitea log when
an attachment upload is blocked.
Chosen log level is info; this may need to be dialed down to trace.
* Get rid of autolink
* autolink in markdown
* Replace email addresses with mailto links
* better handling of links
* Remove autolink.js from footer
* Refactor entire html.go
* fix some bugs
* Make tests green, move what we can to html_internal_test, various other changes to processor logic
* Make markdown tests work again
This is just a description to allow me to force push in order to restart
the drone build.
* Fix failing markdown tests in routers/api/v1/misc
* Add license headers, log errors, future-proof <body>
* fix formatting
* Enable caching on assets and avatars
Fixes #3323
* Only set avatar in user BeforeUpdate when there is no avatar set
* add error checking after stat
* gofmt
* Change cache time for avatars to an hour
* Pull request options migration and UI in settings
* Add ignore whitespace functionality
* Fix settings if pull requests are disabled
* Fix migration transaction
* Merge with Rebase functionality
* UI changes and related functionality for pull request merging button
* Implement squash functionality
* Fix rebase merging
* Fix pull request merge tests
* Add squash and rebase tests
* Fix API method to reuse default message functions
* Some refactoring and small fixes
* Remove more hardcoded values from tests
* Remove unneeded check from API method
* Fix variable name and comment typo
* Fix reset commit count after PR merge
* Serve pull request .diff files
Closes #3259
* Add test for pull request redirection and .diff access
* Typo
* There's no need to test for pr.BaseRepo being nil after calling GetBaseRepo
* refactor struct's time to remove unnecessary memory usage
* use AsTimePtr simple code
* fix tests
* fix time compare
* fix template on gpg
* use AddDuration instead of Add
* Add failing test
* Fix urls
* Improve url in tests
* improve testing
* Remove debug code
* Add deps
* LFS corner-case : Search on lower but store with case
* Temporary comment of blocking action
* fix hooks
* Use temporary repo for git client test
* Use userPassword in place of hard-coded password
* Delete a user's public key via admin api
* Test admin ssh endpoint for creating a new ssh key
* Adapt public ssh key test to also test the delete operation
* Test that deleting a missing key will result in a 404
* Test that a normal user can't delete another user's ssh key
* Make DeletePublicKey return err
* Update swagger doc
* Implement routes
* move to api/sdk and create model
* Implement add + list
* List return 200 empty list no 404
* Add verify lfs lock api
* Add delete and start implementing auth control
* Revert to code.gitea.io/sdk/gitea vendor
* Apply needed check for all lfs locks route
* Add simple tests
* fix lint
* Improve tests
* Add delete test + fix
* Add lfs ascii header
* Various fixes from review + remove useless code + add more corner case testing
* Remove repo link since only id is needed.
Save a little of memory and cpu time.
* Improve tests
* Use TEXT column format for path + test
* fix mispell
* Use NewRequestWithJSON for POST tests
* Clean path
* Improve DB format
* Revert uniquess repoid+path
* (Re)-setup uniqueness + max path length
* Fixed TEXT in place of VARCHAR
* Settle back to maximum VARCHAR(3072)
* Let place for repoid in key
* Let place for repoid in key
* Let place for repoid in key
* Revert back
* Extended LANDINGPAGE config variable to logged in users and added switch for 'organizations' in addition to 'home' and 'explore'.
* Updated comments.
Signed-off-by: Mike Schaffer <mschaff@gmail.com>
* Extended LANDINGPAGE config variable to trigger when user logs in and added switch for 'organizations' in addition to 'home' and 'explore'.
Signed-off-by: Mike Schaffer <mschaff@gmail.com>
* Extended LANDINGPAGE config variable to logged in users and added switch for 'organizations' in addition to 'home' and 'explore'.
* Updated comments.
Signed-off-by: Mike Schaffer <mschaff@gmail.com>
* Extended LANDINGPAGE config variable to trigger when user logs in and added switch for 'organizations' in addition to 'home' and 'explore'.
Signed-off-by: Mike Schaffer <mschaff@gmail.com>
* Removed superfluous conditional and correct whitespace.
Signed-off-by: Mike Schaffer <mschaff@gmail.com>
* Update app.ini
Reverted new line.
* Formatting.
Signed-off-by: Mike Schaffer <mschaff@gmail.com>
* Set session and indexers' data files rel to AppDataPath
The setting AppDataPath is now relative to the working directory.
The session svc's PROVIDER_CONFIG now defaults to AppDataPath/data/sessions.
The issue indexer's IssuePath now defaults to AppDataPath/indexers/issues.bleves.
* fix bug
* Make URL scheme unambiguous
Redirect old routes to new routes
* Fix redirects to new URL scheme, and update template
* Fix branches/_new endpoints, and update integration test
* Add repo type option to /api/repo/search
* Add tests and fix result of collaborative filter in specific condition
* Fix/optimize search & tests
* Improve integration tests
* Fix lint errors
* Fix unit tests
* Change and improve internal implementation of repo search
* Use NonexistentID
* Make search api more general
* Change mirror and fork search behaviour
* Fix tests & typo in comment
* Add commit count caching
* Small refactoring
* Add different key prefix for refs and commits
* Add configuratuion option to allow to change caching time or disable it
* hide unactive on explore users and some refactors
* fix test for removed Organizations
* fix test for removed Organizations
* fix imports
* fix logic bug
* refactor the toConds
* Rename TestOrganizations to TestSearchUsers and add tests for users
* fix other tests
* fix other tests
* fix watchers tests
* fix comments and remove unused code
* Move swagger interface under /api/v1
* Update swagger-ui
* Add /api/swagger and prepare for multiple api version
* Update test links
* Fix footer link
* Configurable SSH cipher suite
* Update configuration file comment
* Add default in settings loading code
* Fix fmt and log messsage
* Remove default from code as this could probably might not be good idea
* Fix PR, milestone and label functionality if issue unit is disabled or not assigned to user
* Fix multi-actions in PR page
* Change error message
* Fix comment update and delete functionality in PR
* Create new branch from branch selection dropdown and rewrite it to VueJS
* Make updateLocalCopyToCommit as not exported
* Move branch name validation to model
* Fix possible race condition
* Fix so that user can still fork his own repository to his organizations
* Fix to only use owned organizations
* Add integration test for forking own repository to owned organization
* Add Activity page to repository
* Add request data for activity
* Add issue data for activity
* Add user unit right checks
* Add releases to activity
* Log repository unit loading error
* add init support of orgmode document type on file view and readme
* fix imports
* fix imports and readmeExist
* fix imports order
* fix format
* remove unnecessary convert
* Sync releases table with tags on push and for mirrors
* Code style fixes
* Fix api to return only releases
* Optimize release creation and update
Minimize posibility of race conditions
* Fix release lower tag name updating
* handle tag reference update by addionally comparing commit id
* Sort repository tree entries in natural way
* Fix sort for different length strings with first parts equal
* Improve test case
* Refactor return statements
* Update gitea/git dependency
* Hotfix for "Add time manually" (https://github.com/go-gitea/gitea/pull/2211#issuecomment-328780125)
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Checking if Code unit is enabled before creating a fork.
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Adding a discrete function for RepoIDAssignment
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Improved Documentation
* restructure markup & markdown to prepare for multiple markup languages support
* adjust some functions between markdown and markup
* fix tests
* improve the comments
* Implementation of all repositories of a user from user->settings
* Update message when no repository found
* Update according to comments
* Change UI to have a better look
* improved user repositories UI
* Display commit status on landing page of repo
* improve last status of commits and add link to ci
* fix last commit status since the order of ids are desc
* Added comment's hashtag to url for mail notifications.
* Added explanation to return statement + documentation.
* Replacing in-line link generation with HTMLURL. (+gofmt)
* Replaced action-based model with nil-based model. (+gofmt)
* Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants.
* Updating comment for mailIssueCommentToParticipants
* Added link to comment in "Dashboard"
* Deleting feed entry if a comment is going to be deleted
* Added migration
* Added improved migration to add a CommentID column to action.
* Added improved links to comments in feed entries.
* Fixes #1956 by filtering for deleted comments that are referenced in actions.
* Introducing "IsDeleted" column to action.
* Adding design draft (not functional)
* Adding database models for stopwatches and trackedtimes
* See go-gitea/gitea#967
* Adding design draft (not functional)
* Adding translations and improving design
* Implementing stopwatch (for timetracking)
* Make UI functional
* Add hints in timeline for time tracking events
* Implementing timetracking feature
* Adding "Add time manual" option
* Improved stopwatch
* Created report of total spent time by user
* Only showing total time spent if theire is something to show.
* Adding license headers.
* Improved error handling for "Add Time Manual"
* Adding @sapks 's changes, refactoring
* Adding API for feature tracking
* Adding unit test
* Adding DISABLE/ENABLE option to Repository settings page
* Improving translations
* Applying @sapk 's changes
* Removing repo_unit and using IssuesSetting for disabling/enabling timetracker
* Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu
* Improving documentation
* Fixing vendor/ folder
* Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks )
* Restricting write access to timetracking based on the repo settings (Proposed by @lafriks )
* Fixed minor permissions bug.
* Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo
* Allow assignees and authors to track there time too.
* Fixed some build-time-errors + logical errors.
* Removing unused Get...ByID functions
* Moving IsTimetrackerEnabled from context.Repository to models.Repository
* Adding a seperate file for issue related repo functions
* Adding license headers
* Fixed GetUserByParams return 404
* Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons
* Adding /repos/:username/times to get all tracked times of the repo
* Updating sdk-dependency
* Updating swagger.v1.json
* Adding warning if user has already a running stopwatch (auto-timetracker)
* Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions)
* Changing code.gitea.io/sdk back to code.gitea.io/sdk
* Correcting spelling mistake
* Updating vendor.json
* Changing GET stopwatch/toggle to POST stopwatch/toggle
* Changing GET stopwatch/cancel to POST stopwatch/cancel
* Added migration for stopwatches/timetracking
* Fixed some access bugs for read-only users
* Added default allow only contributors to track time value to config
* Fixed migration by chaging x.Iterate to x.Find
* Resorted imports
* Moved Add Time Manually form to repo_form.go
* Removed "Seconds" field from Add Time Manually
* Resorted imports
* Improved permission checking
* Fixed some bugs
* Added integration test
* gofmt
* Adding integration test by @lafriks
* Added created_unix to comment fixtures
* Using last event instead of a fixed event
* Adding another integration test by @lafriks
* Fixing bug Timetracker enabled causing error 500 at sidebar.tpl
* Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning.
* Returning TrackedTime instead of AddTimeOption at AddTime.
* Updating SDK from go-gitea/go-sdk#69
* Resetting Go-SDK back to default repository
* Fixing test-vendor by changing ini back to original repository
* Adding "tags" to swagger spec
* govendor sync
* Removed duplicate
* Formatting templates
* Adding IsTimetrackingEnabled checks to API
* Improving translations / english texts
* Improving documentation
* Updating swagger spec
* Fixing integration test caused be translation-changes
* Removed encoding issues in local_en-US.ini.
* "Added" copyright line
* Moved unit.IssuesConfig().EnableTimetracker into a != nil check
* Removed some other encoding issues in local_en-US.ini
* Improved javascript by checking if data-context exists
* Replaced manual comment creation with CreateComment
* Removed unnecessary code
* Improved error checking
* Small cosmetic changes
* Replaced int>string>duration parsing with int>duration parsing
* Fixed encoding issues
* Removed unused imports
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Don't allow for plain username/password authentication when 2FA is enabled
* Removed debugging statement
* Don't assume a token belongs to a given user, handle two-factor errors properly
* Simplified user/token matching, refactored error handling for two-factor authentication
* Change authentication response to avoid bruteforcing
* Add TODO item as a comment for changing the response for security purposes
* Remove unit types commits and settings
* Can not limit units in administrator teams
* Limit changing units only to teams with read and write access mode
* Small code optimization
* Added count to GetReleasesByRepoID so pagination will work
* Separated it out to a new function, can then also leave the API part unaffected
* Remove extra whitespace added in untouched function
* Added comment and corrected name in error handler
* Account for if the user is owner or not in the count
* Also check if repo is draft
* revert back to the correct count in the ReleasesToDisplay loop
* Fixed lint error regarding else with return statement
* Use Cond struct instead of string, corrected name in error handler
* Removed unused return variable names
* Make branch deletion URL more like GitHub's, fixes #1397
* Add PR branch deletion integration test
* Do not allow deleting protected branch
* Change http error code to 403 if user has no write rights to repository
* Add check to not panic if forked repository has alrady been deleted
* Separate generate-swagger
* Remove go generate rules
* Add missing definition replacement + remove use of -i sed flag
for compatibility with mac os default sed version.
This is a little hacky a better solution could be use.
* Use custom SED_INPLACE
depending of platform detection
* Use SED_INPLACE for swagger-ui also
* Support CRLF when splitting code lines for display
* refactor, fix mixed match
* fmt
* split on both LF and CRLF, use raw literals in regexes
* simplify
* Display all organization from user settings
* fix Tab selection
* Update locale_en-US.ini
* Add a condition for display Create organization button
* Remove french translation
* Remove unnecessary admin flag
* add units to team
* fix lint
* finish team setting backend
* finished permission controll on routes
* fix import blank line
* add unit check on ssh/http pull and push and fix test failed
* fix fixtures data
* remove unused code
* Forgot password should use ResetPwdCodeLives, not ActiveCodeLives
* Improve documentation for different send mail functions related to password reset
* Improve documentation in conf/app.ini regarding xxx_CODE_LIVE_MINUTES settings
* Show commit status icon in commits table
* Add comments
* Fix icons
* Few more places where commit table is displayed
* Change integration test to use goquery for parsing html
* Add integration tests for commit table and status icons
* Fix status to return lates status correctly on all databases
* Rewrote lates commit status selects
* move all database operations from hook command to web command and instead of internal routes
* bug fixed
* adjust the import path sequences
* remove unused return value on hookSetup
- Generate swagger.json into public/
- Add swagger-ui auto-installation
- Add footer link to local swagger-ui
- Add /swagger url for using app url.
- Fix Swagger-UI version via git tag
* Do not allow commiting to protected branch from online editor
* Add editor integration tests for adding new file and not allowing to add new file to protected branch
* add google+
* sort signin oauth2 providers based on the name so order is always the same
* update auth tip for google+
* add gitlab provider
* add bitbucket provider (and some go fmt)
* add twitter provider
* add facebook provider
* add dropbox provider
* add openid connect provider incl. new format of tips section in "Add New Source"
* lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow)
* imports according to goimport and code style
* make it possible to set custom urls to gitlab and github provider (only these could have a different host)
* split up oauth2 into multiple files
* small typo in comment
* fix indention
* fix indentation
* fix new line before external import
* fix layout of signin part
* update "broken" dependency
* add internal routes for ssh hook comands
* fix lint
* add comment on why package named private not internal but the route name is internal
* add comment above package private why package named private not internal but the route name is internal
* remove exp time on internal access
* move routes from /internal to /api/internal
* add comment and defer on UpdatePublicKeyUpdated
* Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION
Omit the configuration variable (the default) to be dependent.
Fixes #1363
* Move OpenID settings under Service object
* Show OpenID SignUp and SignIn status in admin panel / configuration
* GPG commit validation
* Add translation
+ some little fix
* Move hash calc after retrieving of potential key + missing translation
* Add some little test
Also renames `forgot_password` translation key to
`forgot_password_title` and `forget_password` to
`forgot_password`
Includes entry in CHANGELOG about the breaking change
(and some markdown fixes in there)
It's helpful when you forgot your password thus cannot change it
(can happen if you log in via OAuth2 or OpenID)
Also make sure that both the delete-account and password-change
links to forgot-password will have the primary email pre-filled
* Implement '/api/v1/version'
* Cleanup and various fixes
* Enhance run.sh
* Add install_test.go
* Add parameter utils.Config for testing handlers
* Re-organize TestVersion.go
* Rename functions
* handling process cleanup properly
* Fix missing function renaming
* Cleanup the 'retry' logic
* Cleanup
* Remove unneeded logging code
* Logging messages tweaking
* Logging message tweaking
* Fix logging messages
* Use 'const' instead of hardwired numbers
* We don't really need retries anymore
* Move constant ServerHttpPort to install_test.go
* Restore mistakenly removed constant
* Add required comments to make the linter happy.
* Fix comments and naming to address linter's complaints
* Detect Gitea executale version automatically
* Remove tests/run.sh, `go test` suffices.
* Make `make build` a prerequisite of `make test`
* Do not sleep before trying
* Speedup the server pinging loop
* Use defined const instead of hardwired numbers
* Remove redundant error handling
* Use a dedicated target for running code.gitea.io/tests
* Do not make 'test' depend on 'build' target
* Rectify the excluded package list
* Remove redundant 'exit 1'
* Change the API to allow passing test.T to test handlers
* Make testing.T an embedded field
* Use assert.Equal to comparing results
* Add copyright info
* Parametrized logging output
* Use tmpdir instead
* Eliminate redundant casting
* Remove unneeded variable
* Fix last commit
* Add missing copyright info
* Replace fmt.Fprintf with fmt.Fprint
* rename the xtest to integration-test
* Use Symlink instead of hard-link for cross-device linking
* Turn debugging logs on
* Follow the existing framework for APIs
* Output logs only if test.v is true
* Re-order import statements
* Enhance the error message
* Fix comment which breaks the linter's rule
* Rename 'integration-test' to 'e2e-test' for saving keystrokes
* Add comment to avoid possible confusion
* Rename tests -> integration-tests
Also change back the Makefile to use `make integration-test`.
* Use tests/integration for now
* tests/integration -> integrations
Slightly flattened directory hierarchy is better.
* Update Makefile accordingly
* Fix a missing change in Makefile
* govendor update code.gitea.io/sdk/gitea
* Fix comment of struct fields
* Fix conditional nonsense
* Fix missing updates regarding version string changes
* Make variable naming more consistent
* Check http status code
* Rectify error messages
* fixes #1050 where linking an account to a 2fa enabled account failed because we forgot to really link the account when 2fa is completed
* handle errors
* move all push update to git hook post-receive and protected branch check to git hook pre-receive
* add SSH_ORIGINAL_COMMAND check back
* remove all unused codes
* fix the import
* initial stuff for oauth2 login, fails on:
* login button on the signIn page to start the OAuth2 flow and a callback for each provider
Only GitHub is implemented for now
* show login button only when the OAuth2 consumer is configured (and activated)
* create macaron group for oauth2 urls
* prevent net/http in modules (other then oauth2)
* use a new data sessions oauth2 folder for storing the oauth2 session data
* add missing 2FA when this is enabled on the user
* add password option for OAuth2 user , for use with git over http and login to the GUI
* add tip for registering a GitHub OAuth application
* at startup of Gitea register all configured providers and also on adding/deleting of new providers
* custom handling of errors in oauth2 request init + show better tip
* add ExternalLoginUser model and migration script to add it to database
* link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed
* remove the linked external account from the user his settings
* if user is unknown we allow him to register a new account or link it to some existing account
* sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers)
* from gorilla/sessions docs:
"Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!"
(we're using gorilla/sessions for storing oauth2 sessions)
* use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
* Protected branches system
* Moved default branch to branches section (`:org/:reponame/settings/branches`).
* Initial support Protected Branch.
- Admin does not restrict
- Owner not to limit
- To write permission restrictions
* reformat tmpl
* finished the UI and add/delete protected branch response
* remove unused comment
* indent all the template files and remove ru translations since we use crowdin
* fix the push bug
* Fix assigned/created issues in dashboard. (#3560)
* Fix assigned/created issues in dashboard.
* Use GetUserIssueStats for getting all Dashboard stats.
* Use gofmt to format the file properly.
* Replace &Issue{} with new(Issue).
* Check if user has access to given repository.
* Remove unnecessary filtering of issues.
* Return 404 error if invalid repository is given.
* Use correct number of issues in paginater.
* fix issues on dashboard
* feat: support search bar on star tab of user profile.
* fix: update testing.
* fix: Using loadAttributes
* fix: remove empty line.
* remove LOWER
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Markdown rendering overhaul
Cleaned up and squashed commits into single one.
Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
* Fix markdown API, add markdown module and API tests, improve code coverage
Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
This change corrects a few logging issues:
* Standardized formatting errors with '%v'.
* Standardized failure warning word usage.
* Corrected an instance of using the standard log library when
the gitea log library should be used instead.
* Add a process.Manager singleton with process.GetManager()
* Use process.GetManager everywhere
* Fix godoc comments for process module
* Increment process counter id after locking the mutex
* Moved attachaments POST url from /issues/attachments to /attachments
* Implemented attachment upload on release page
* Implemented downloading attachments on the release page
* Added zip and gzip files to default allowed attachments
* Implemented uploading attachments on edit release
* Renamed UploadIssueAttachment to UploadAttachment
* Use relative URLs
* Notifications - Mark as read/unread
* Feature of pinning a notification
* On view issue, do not mark as read a pinned notification
- Add site-wide option DEFAULT_KEEP_EMAIL_PRIVATE.
- Add the new option to the install and admin/config pages.
- Add the new option to app.ini in the service section.
- Add the new option to the settings struct.
- Add English text strings to i18n.
- Add field KeepEmailPrivate to user struct.
- Add field KeepEmailPrivate to user form.
- Add option to UI.
- Add using noreply email address if user has "Keep Email Private".
An email address <LowerName>@<NO_REPLY_ADDRESS> is now used in commit
messages (and hopefully all other git log relevant places). The
change relies on the fact that git commands should use
user.NetGitSig().
- Add hiding of email address in UI, if user has set "Keep Email Private".
- Add condition to show email address only on explore/users and user
pages, if user has not set "Keep Email Private".
- Add noreply email in API if set "Keep Email Private".
- Add a new service setting NO_REPLY_ADDRESS. The value of this
setting is used as the domain part for the user's email address in
git log, iff he decides to keep his email address private.
If the user decides to keep his email address private and this
option is not set 'noreply.example.org' is used, which no MTA
should send email to.
Add NO_REPLY_ADDRESS to conf/app.ini.
* UI config to toggle whether user email shows up in Explore Users
* Recommendation made by @tboerger
66a1c59fe7 (r94122732)
* fixed typo, rename ShowUserEmailInExplore to ShowUserEmail
* Fixed typo merged conflict
* Hide email in the user profile page
if you are active ShowUserEmail
ref https://github.com/go-gitea/gitea/pull/336#issuecomment-269843725
* Please replace MustBool() with MustBool(true)
* restrict creating organizations based on right on user
* revert bindata.go
* reverse vendor lib
* revert goimports change
* set AllowCreateOrganization default value to true
* revert locale
* added default value for AllowCreateOrganization
* fix typo in migration-comment
* fix comment
* add coments in migration
* Tab on user profile to show starred repos
* Make golint happy and use transactions on StarRepo function
* x -> sess
* Use sess.Close() instead of sess.Rollback()
* Add copyright
* Fix lint
* Import github.com/git-lfs/lfs-test-server as lfs module base
Imported commit is 3968aac269a77b73924649b9412ae03f7ccd3198
Removed:
Dockerfile CONTRIBUTING.md mgmt* script/ vendor/ kvlogger.go
.dockerignore .gitignore README.md
* Remove config, add JWT support from github.com/mgit-at/lfs-test-server
Imported commit f0cdcc5a01599c5a955dc1bbf683bb4acecdba83
* Add LFS settings
* Add LFS meta object model
* Add LFS routes and initialization
* Import github.com/dgrijalva/jwt-go into vendor/
* Adapt LFS module: handlers, routing, meta store
* Move LFS routes to /user/repo/info/lfs/*
* Add request header checks to LFS BatchHandler / PostHandler
* Implement LFS basic authentication
* Rework JWT secret generation / load
* Implement LFS SSH token authentication with JWT
Specification: https://github.com/github/git-lfs/tree/master/docs/api
* Integrate LFS settings into install process
* Remove LFS objects when repository is deleted
Only removes objects from content store when deleted repo is the only
referencing repository
* Make LFS module stateless
Fixes bug where LFS would not work after installation without
restarting Gitea
* Change 500 'Internal Server Error' to 400 'Bad Request'
* Change sql query to xorm call
* Remove unneeded type from LFS module
* Change internal imports to code.gitea.io/gitea/
* Add Gitea authors copyright
* Change basic auth realm to "gitea-lfs"
* Add unique indexes to LFS model
* Use xorm count function in LFS check on repository delete
* Return io.ReadCloser from content store and close after usage
* Add LFS info to runWeb()
* Export LFS content store base path
* LFS file download from UI
* Work around git-lfs client issue with unauthenticated requests
Returning a dummy Authorization header for unauthenticated requests
lets git-lfs client skip asking for auth credentials
See: https://github.com/github/git-lfs/issues/1088
* Fix unauthenticated UI downloads from public repositories
* Authentication check order, Finish LFS file view logic
* Ignore LFS hooks if installed for current OS user
Fixes Gitea UI actions for repositories tracking LFS files.
Checks for minimum needed git version by parsing the semantic version
string.
* Hide LFS metafile diff from commit view, marking as binary
* Show LFS notice if file in commit view is tracked
* Add notbefore/nbf JWT claim
* Correct lint suggestions - comments for structs and functions
- Add comments to LFS model
- Function comment for GetRandomBytesAsBase64
- LFS server function comments and lint variable suggestion
* Move secret generation code out of conditional
Ensures no LFS code may run with an empty secret
* Do not hand out JWT tokens if LFS server support is disabled
* Enables mssql support
Port of dlobs work in gogs.
Enables options in index.js
Enables MSSQL as a database option in go.
Sets ID to 0 on initial migration. Required for
MSSQL insert statements.
Signed-off-by: Beau Trepp <beautrepp@gmail.com>
* Vendors in denisenkom/go-mssqldb
Includes golang.org/x/crypto/md4
as this is required by go-msssqldb
Signed-off-by: Beau Trepp <beautrepp@gmail.com>
* Check if file is a symlink with web editor (#3687)
* editor checks for symlinks
* translate file_is_a_symlink message
* credit translation author
* fix error constant
* Remove unused custom-alphabet feature of random string generator
Fix random string generator
Random string generator should return error if it fails to read random data via crypto/rand
* Fixes variable (un)initialization mixed assign
Update test GetRandomString
* Get rid of the bin folder within the build process
Signed-off-by: Thomas Boerger <thomas@webhippie.de>
* Dropped latest make task, it is unused
Signed-off-by: Thomas Boerger <thomas@webhippie.de>
* Added tidb tag to drone config
Signed-off-by: Thomas Boerger <thomas@webhippie.de>
* Dropped the cert build tag
Signed-off-by: Thomas Boerger <thomas@webhippie.de>
* Dropped useless minwinsvc build tag
Signed-off-by: Thomas Boerger <thomas@webhippie.de>
* Dropped the useless build tags from drone config
Signed-off-by: Thomas Boerger <thomas@webhippie.de>
- Download filename was wrong for files other than images. Example: It was `download` instead of `file.pdf`
- PDF was downloading instead of showing on browser
* golint fixed for parts of routers root, dev and org dirs
* add user/auth.go golint fixed
* rename unnecessary exported to unexported and user dir golint fixed
* Write LDAP, SMTP, PAM, DLDAP back to all uppercase
* Fix type in unused constant name
* Other MixCased fixes
* Complete MixerCasing of template constants
* Re uppercase LTS and LDAPS suffixes
* Uppercase JSON suffix in constant names
* Proper case LoginNoType
* Prefix unexported template path constants with "tpl"
Still use GOGS_WORK_DIR and GOGS_CUSTOM env variables
as a fallback if the equivalent GITEA_* are not set,
warning user about the need for change.
Does not change "gogs" to "gitea" in webhook type name
Because "gogs" hook type is part of the API (routes) and used
in templates...
Closes #87
* Can use a predefined set of labels
* Change UI
* Fix HTML file indentation
* Avoid reading file from other directory (security issue)
* Apply a better fix
* Remove not used variable
* Merge upstream/develop
* Do modifications
* Raname
* remove binding + rename variable
* Implement wiki mirroring, add Update mirrors operation to admin dashboard
* bindata.go update after merge
* Implement checking Git repo endpoint existence, support for BB included
* Remove admin dashboard operation
Fix bindata.go
* Apply gofmt to repo model file
* Try to remove bindata from PR
* Revert accepted wiki names change in favor of better system
* Remove unused imports
* Add support for federated avatars
Fixes #3105
Removes avatar fetching duplication code
Adds an "Enable Federated Avatar" checkbox in user settings
(defaults to unchecked)
Moves avatar settings all in the same form, making
local and remote avatars mutually exclusive
Renames UploadAvatarForm to AvatarForm
as it's not anymore only for uploading
* Run gofmt on all modified files
* Move Avatar form in its own page
* Add go-libravatar dependency to vendor/ dir
Hopefully helps with accepting the contribution.
See also #3214
* Revert "Add go-libravatar dependency to vendor/ dir"
This reverts commit a8cb93ae640bbb90f7d25012fc257bda9fae9b82.
* Make federated avatar setting a global configuration
Removes the per-user setting
* Move avatar handling back to base tool, disable federated avatar in offline mode
* Format, handle error
* Properly set fallback host
* Use unsupported github.com mirror for importing go-libravatar
* Remove comment showing life exists outside of github.com
... pity, but contribution would not be accepted otherwise
* Use Combo for Get and Post methods over /avatar
* FEDERATED_AVATAR -> ENABLE_FEDERATED_AVATAR
* Fix persistance of federated avatar lookup checkbox at install time
* Federated Avatars -> Enable Federated Avatars
* Use len(string) == 0 instead of string == ""
* Move import line where it belong
See
https://github.com/Unknwon/go-code-convention/blob/master/en-US/import_packages.md
Pity the import url is still the unofficial one, but oh well...
* Save a line (and waste much more expensive time)
* Remove redundant parens
* Remove an empty line
* Remove empty lines
* Reorder lines to make diff smaller
* Remove another newline
Unknwon review got me start a fight against newlines
* Move DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR after OFFLINE_MODE
On re-reading the diff I figured what Unknwon meant here:
https://github.com/gogits/gogs/pull/3320/files#r73741106
* Remove newlines that weren't there before my intervention
* Fix #3315: Release dont use tag creation date
* Simplify code and apply gofmt
* remove useless block (ctx.Repo.GitRepo.GetTag) on EditReleasePost
* apply gofmt on modified files
* Add API support for labels.
* Error handling for adding/replacing multiple issue labels
* Revisions to function names and error handling. Use issue.ClearLabels in replace/clear functions
* Additional code cleanup
* Add support for .diff and .patch
Add the ability to get text-diff and format-patch by adding .diff or
.patch in the end of a commit url. Issue #2641
* models: git_diff: various fixes
* Renames commitId to commitID.
* Writes stderr to a bytes.Buffer and displays proper error message on
command failure.
* Various style changes.
Signed-off-by: Dennis Chen <barracks510@gmail.com>
When calculating the current behind commit count the calculation should
use the current release target to get the total commit count. Should the
release target not exist anymore the calculation will return zero for
the newest release on that target. Older releases on that target will then
use that calculated commit count as reference.
The only use case that is now somehow invalid is when the release target
was merged / deleted after a tag on that release target:
master 1 - - - - - - - 6
\ /
branch 2 - 3 - 4 - 5
When `4` is the last tag on branch `branch` and the branch `branch` is not
yet deleted the calculated numbers would be:
1 commits to branch since this release
Now if the branch `branch` gets deleted the calculation function will not
find the branch and use the commit count of the newest release (`4`) as
reference resulting in:
0 commit to branch since this release
This fixes #3326
Allows the deletion of a webhook from a repository at the
/:user/:repo/hooks/:id endpoint.
Solves drone/drone issue #1603.
Signed-off-by: Dennis Chen <barracks510@gmail.com>
Executed go fmt
getEngine() not handles DB parameters (#2972) (#2974)
Uses .AllCols() for Update in updateMirror()
Spanish traslation removed
Fixed a wrong way to ommit the --prune option in process.ExecDir() for MirrorUpdate function