* Add option to provide signed token to verify key ownership
Currently we will only allow a key to be matched to a user if it matches
an activated email address. This PR provides a different mechanism - if
the user provides a signature for automatically generated token (based
on the timestamp, user creation time, user ID, username and primary
email.
* Ensure verified keys can act for all active emails for the user
* Add code to mark keys as verified
* Slight UI adjustments
* Slight UI adjustments 2
* Simplify signature verification slightly
* fix postgres test
* add api routes
* handle swapped primary-keys
* Verify the no-reply address for verified keys
* Only add email addresses that are activated to keys
* Fix committer shortcut properly
* Restructure gpg_keys.go
* Use common Verification Token code
Signed-off-by: Andrew Thornton <[email protected]>
* Always store primary email address into email_address table and also the state
* Add lower_email to not convert email to lower as what's added
* Fix fixture
* Fix tests
* Use BeforeInsert to save lower email
* Fix v180 migration
* fix tests
* Fix test
* Remove wrong submited codes
* Fix test
* Fix test
* Fix test
* Add test for v181 migration
* remove change user's email to lower
* Revert change on user's email column
* Fix lower email
* Fix test
* Fix test
* chore: rewrite format.
* chore: update format
Signed-off-by: Bo-Yi Wu <[email protected]>
* chore: update format
Signed-off-by: Bo-Yi Wu <[email protected]>
* chore: Adjacent parameters with the same type should be grouped together
* chore: update format.
* make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination
* if new pending transfer ocured, create UI & Mail notifications
* Add redirect for user
* Add redirect for orgs
* Add user redirect test
* Appease linter
* Add comment to DeleteUserRedirect function
* Fix locale changes
* Fix GetUserByParams
* Fix orgAssignment
* Remove debug logging
* Add redirect prompt
* Dont Export DeleteUserRedirect & only use it within a session
* Unexport newUserRedirect
* cleanup
* Fix & Dedub API code
* Format Template
* Add Migration & rm dublicat
* Refactor: unexport newRepoRedirect() & rm dedub del exec
* if this fails we'll need to re-rename the user directory
Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
* add black list and white list support for migrating repositories
* fix fmt
* fix lint
* fix vendor
* fix modules.txt
* clean diff
* specify log message
* use blocklist/allowlist
* allways use lowercase to match url
* Apply allow/block
* Settings: use existing "migrations" section
* convert domains lower case
* dont store unused value
* Block private addresses for migration by default
* fix lint
* use proposed-upstream func to detect private IP addr
* a nit
* add own error for blocked migration, add tests, imprufe api
* fix test
* fix-if-localhost-is-ipv4
* rename error & error message
* rename setting options
* Apply suggestions from code review
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* Improve error feedback for duplicate deploy keys
Instead of a generic HTTP 500 error page, a flash message is rendered
with the deploy key page template so inform the user that a key with the
intended title already exists.
* API returns 422 error when key with name exists
* Add email validity checking
Add email validity checking for the following routes:
[Web interface]
1. User registration
2. User creation by admin
3. Adding an email through user settings
[API]
1. POST /admin/users
2. PATCH /admin/users/:username
3. POST /user/emails
* Add further tests
* Add signup email tests
* Add email validity check for linking existing account
* Address PR comments
* Remove unneeded DB session
* Move email check to updateUser
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Instead of a generic HTTP 500 error page, a flash message is rendered with the deploy key page template to inform the user that a key with the intended title already exists.
Fixes#13110
* Don't automatically delete repository files if they are present
Prior to this PR Gitea would delete any repository files if they are
present during creation or migration. This can in certain circumstances
lead to data-loss and is slightly unpleasant.
This PR provides a mechanism for Gitea to adopt repositories on creation
and otherwise requires an explicit flag for deletion.
PushCreate is slightly different - the create will cause adoption if
that is allowed otherwise it will delete the data if that is allowed.
Signed-off-by: Andrew Thornton <[email protected]>
* Update swagger
Signed-off-by: Andrew Thornton <[email protected]>
* Fix tests and migrate overwrite
Signed-off-by: Andrew Thornton <[email protected]>
* as per @lunny
Only offer to adopt or overwrite if the user can do that.
Allow the site administrator to adopt or overwrite in all
circumstances
Signed-off-by: Andrew Thornton <[email protected]>
* Use setting.Repository.DefaultBranch for the default branch
Signed-off-by: Andrew Thornton <[email protected]>
* Always set setting.Repository.DefaultBranch
Signed-off-by: Andrew Thornton <[email protected]>
* update swagger
Signed-off-by: Andrew Thornton <[email protected]>
* update templates
Signed-off-by: Andrew Thornton <[email protected]>
* ensure repo closed
Signed-off-by: Andrew Thornton <[email protected]>
* Rewrite of adoption as per @6543 and @lunny
Signed-off-by: Andrew Thornton <[email protected]>
* Apply suggestions from code review
* update swagger
Signed-off-by: Andrew Thornton <[email protected]>
* missing not
Signed-off-by: Andrew Thornton <[email protected]>
* add modals and flash reporting
Signed-off-by: Andrew Thornton <[email protected]>
* Make the unadopted page searchable
Signed-off-by: Andrew Thornton <[email protected]>
* Add API
Signed-off-by: Andrew Thornton <[email protected]>
* Fix swagger
Signed-off-by: Andrew Thornton <[email protected]>
* fix swagger
Signed-off-by: Andrew Thornton <[email protected]>
* Handle empty and non-master branched repositories
Signed-off-by: Andrew Thornton <[email protected]>
* placate lint
Signed-off-by: Andrew Thornton <[email protected]>
* remove commented out code
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* [FEATURE] [API] Add Endpoint for Branch Creation
Issue: https://github.com/go-gitea/gitea/issues/11376
This commit introduces an API endpoint for branch creation.
The added route is POST /repos/{owner}/{repo}/branches.
A JSON with the name of the new branch and the name of the old branch is
required as parameters.
Signed-off-by: Terence Le Huu Phuong <[email protected]>
* Put all the logic into CreateBranch and removed CreateRepoBranch
* - Added the error ErrBranchDoesNotExist in error.go
- Made the CreateNewBranch function return an errBranchDoesNotExist error
when the OldBranch does not exist
- Made the CreateBranch API function checks that the repository is not
empty and that branch exists.
* - Added a resetFixtures helper function in integration_test.go to
fine-tune test env resetting
- Added api test for CreateBranch
- Used resetFixture instead of the more general prepareTestEnv in the
repo_branch_test CreateBranch tests
* Moved the resetFixtures call inside the loop for APICreateBranch function
* Put the prepareTestEnv back in repo_branch_test
* fix import order/sort api branch test
Co-authored-by: zeripath <[email protected]>
* Refactor Cron and merge dashboard tasks
* Merge Cron and Dashboard tasks
* Make every cron task report a system notice on completion
* Refactor the creation of these tasks
* Ensure that execution counts of tasks is correct
* Allow cron tasks to be started from the cron page
* golangci-lint fixes
* Enforce that only one task with the same name can be registered
Signed-off-by: Andrew Thornton <[email protected]>
* fix name check
Signed-off-by: Andrew Thornton <[email protected]>
* as per @guillep2k
* as per @lafriks
Signed-off-by: Andrew Thornton <[email protected]>
* Add git.CommandContext variants
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* Add organization wide labels
Implement organization wide labels similar to organization wide
webhooks. This lets you create individual labels for organizations that can be used
for all repos under that organization (so being able to reuse the same
label across multiple repos).
This makes it possible for small organizations with many repos to use
labels effectively.
Fixes#7406
* Add migration
* remove comments
* fix tests
* Update options/locale/locale_en-US.ini
Removed unused translation string
* show org labels in issue search label filter
* Use more clear var name
* rename migration after merge from master
* comment typo
* update migration again after rebase with master
* check for orgID <=0 per guillep2k review
* fmt
* Apply suggestions from code review
Co-Authored-By: guillep2k <[email protected]>
* remove unused code
* Make sure RepoID is 0 when searching orgID per code review
* more changes/code review requests
* More descriptive translation var per code review
* func description/delete comment when issue label deleted instead of hiding it
* remove comment
* only use issues in that repo when calculating number of open issues for org label on repo label page
* Add integration test for IssuesSearch API with labels
* remove unused function
* Update models/issue_label.go
Co-Authored-By: guillep2k <[email protected]>
* Use subquery in GetLabelIDsInReposByNames
* Fix tests to use correct orgID
* fix more tests
* IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well
* update comment for clarity
* Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition
* Don't sort repos by date in IssuesSearch API
After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures:
SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45
Returns different results for MySQL than other engines. However, the similar query:
SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30
Returns the same results.
This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function.
* linter is back!
* code review
* remove now unused option
* Fix newline at end of files
* more unused code
* update to master
* check for matching ids before query
* Update models/issue_label.go
Co-Authored-By: 6543 <[email protected]>
* Update models/issue_label.go
* update comments
* Update routers/org/setting.go
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: guillep2k <[email protected]>
Co-authored-by: 6543 <[email protected]>
* upgrade golangci-lint to 1.24.0 to allow go 1.14 compatibility
* fix golangci-lint errors
* make make golangci-lint work when out of go-path
Signed-off-by: Andrew Thornton <[email protected]>
* Handle push rejections and push out-of-date in branch creation and
file upload.
* Remove the duplicated sanitize from services/pull/merge
* Move the errors Err(Merge)PushOutOfDate and ErrPushRejected to
modules/git
* Handle errors better in the upload file dialogs
Fix#10460
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: guillep2k <[email protected]>
* Add require signed commit for protected branch
* Fix fmt
* Make editor show if they will be signed
* bugfix
* Add basic merge check and better information for CRUD
* linting comment
* Add descriptors to merge signing
* Slight refactor
* Slight improvement to appearances
* Handle Merge API
* manage CRUD API
* Move error to error.go
* Remove fix to delete.go
* prep for merge
* need to tolerate \r\n in message
* check protected branch before trying to load it
* Apply suggestions from code review
Co-Authored-By: guillep2k <[email protected]>
* fix commit-reader
Co-authored-by: guillep2k <[email protected]>
* Adds functionality to change target branch of created pull requests
Signed-off-by: Mario Lubenka <[email protected]>
* Use const instead of var in JavaScript additions
Signed-off-by: Mario Lubenka <[email protected]>
* Check if branches are equal and if PR already exists before changing target branch
Signed-off-by: Mario Lubenka <[email protected]>
* Make sure to check all commits
Signed-off-by: Mario Lubenka <[email protected]>
* Print error messages for user as error flash message
Signed-off-by: Mario Lubenka <[email protected]>
* Disallow changing target branch of closed or merged pull requests
Signed-off-by: Mario Lubenka <[email protected]>
* Resolve conflicts after merge of upstream/master
Signed-off-by: Mario Lubenka <[email protected]>
* Change order of branch select fields
Signed-off-by: Mario Lubenka <[email protected]>
* Removes duplicate check
Signed-off-by: Mario Lubenka <[email protected]>
* Use ctx.Tr for translations
Signed-off-by: Mario Lubenka <[email protected]>
* Recompile JS
Signed-off-by: Mario Lubenka <[email protected]>
* Use correct translation namespace
Signed-off-by: Mario Lubenka <[email protected]>
* Remove redundant if condition
Signed-off-by: Mario Lubenka <[email protected]>
* Moves most change branch logic into pull service
Signed-off-by: Mario Lubenka <[email protected]>
* Completes comment
Signed-off-by: Mario Lubenka <[email protected]>
* Add Ref to ChangesPayload for logging changed target branches
instead of creating a new struct
Signed-off-by: Mario Lubenka <[email protected]>
* Revert changes to go.mod
Signed-off-by: Mario Lubenka <[email protected]>
* Directly use createComment method
Signed-off-by: Mario Lubenka <[email protected]>
* Return 404 if pull request is not found. Move written check up
Signed-off-by: Mario Lubenka <[email protected]>
* Remove variable declaration
Signed-off-by: Mario Lubenka <[email protected]>
* Return client errors on change pull request target errors
Signed-off-by: Mario Lubenka <[email protected]>
* Return error in commit.HasPreviousCommit
Signed-off-by: Mario Lubenka <[email protected]>
* Adds blank line
Signed-off-by: Mario Lubenka <[email protected]>
* Test patch before persisting new target branch
Signed-off-by: Mario Lubenka <[email protected]>
* Update patch before testing (not working)
Signed-off-by: Mario Lubenka <[email protected]>
* Removes patch calls when changeing pull request target
Signed-off-by: Mario Lubenka <[email protected]>
* Removes unneeded check for base name
Signed-off-by: Mario Lubenka <[email protected]>
* Moves ChangeTargetBranch completely to pull service. Update patch status.
Signed-off-by: Mario Lubenka <[email protected]>
* Set webhook mode after errors were validated
Signed-off-by: Mario Lubenka <[email protected]>
* Update PR in one transaction
Signed-off-by: Mario Lubenka <[email protected]>
* Move logic for check if head is equal with branch to pull model
Signed-off-by: Mario Lubenka <[email protected]>
* Adds missing comment and simplify return
Signed-off-by: Mario Lubenka <[email protected]>
* Adjust CreateComment method call
Signed-off-by: Mario Lubenka <[email protected]>
* reject reactions wich ar not allowed
* dont duble check CreateReaction now throw ErrForbiddenIssueReaction
* add /repos/{owner}/{repo}/issues/comments/{id}/reactions endpoint
* add Find Functions
* fix some swagger stuff + add issue reaction endpoints + GET ReactionList now use FindReactions...
* explicite Issue Only Reaction for FindReactionsOptions with "-1" commentID
* load issue; load user ...
* return error again
* swagger def canged after LINT
* check if user has ben loaded
* add Tests
* better way of comparing results
* add suggestion
* use different issue for test
(dont interfear with integration test)
* test dont compare Location on timeCompare
* TEST: add forbidden dubble add
* add comments in code to explain
* add settings.UI.ReactionsMap
so if !setting.UI.ReactionsMap[opts.Type] works
There are two major components to this PR:
* This PR handles merge and rebase failures from merging a little more nicely with Flash errors rather a 500.
* All git commands are run in the LC_ALL="C" environment to ensure that error messages are in English. This DefaultLocale is defined in a way that if necessary (due to platform weirdness) it can be overridden at build time using LDFLAGS="-X "code.gitea.io/gitea/modules/git.DefaultLocale=C"" with C changed for the locale as necessary.
* Check if file is locked on upload file commit.
* Better user message if file is locked.
* Check lfs lock before creating temporary repository. fix some errors.
* move lines
* Add comment that enabled setting is checked.
* move all mail related codes from models to modules/mailer
* fix lint
* use DBContext instead Engine
* use WithContext not WithEngine
* Use DBContext instead of Engine
* don't use defer when sess.Close()
* move DBContext to context.go and add some methods
* move mailer from modules/ to services
* fix lint
* fix tests
* fix fmt
* add gitea copyright
* fix tests
* don't expose db functions
* make code clear
* add DefaultDBContext
* fix build
* fix bug
* Add teams to repo on collaboration page.
Signed-off-by: David Svantesson <[email protected]>
* Add option for repository admins to change teams access to repo.
Signed-off-by: David Svantesson <[email protected]>
* Add comment for functions
Signed-off-by: David Svantesson <[email protected]>
* Make RepoAdminChangeTeamAccess default false in xorm and make it default checked in template instead.
Signed-off-by: David Svantesson <[email protected]>
* Make proper language strings and fix error redirection.
* Add unit tests for adding and deleting team from repository.
Signed-off-by: David Svantesson <[email protected]>
* Add database migration
Signed-off-by: David Svantesson <[email protected]>
* Fix redirect
Signed-off-by: David Svantesson <[email protected]>
* Fix locale string mismatch.
Signed-off-by: David Svantesson <[email protected]>
* Move team access mode text logic to template.
* Move collaborator access mode text logic to template.
* Use go-git for tree reading and commit info lookup.
Signed-off-by: Filip Navara <[email protected]>
* Use TreeEntry.IsRegular() instead of ObjectType that was removed.
Signed-off-by: Filip Navara <[email protected]>
* Use the treePath to optimize commit info search.
Signed-off-by: Filip Navara <[email protected]>
* Extract the latest commit at treePath along with the other commits.
Signed-off-by: Filip Navara <[email protected]>
* Fix listing commit info for a directory that was created in one commit and never modified after.
Signed-off-by: Filip Navara <[email protected]>
* Avoid nearly all external 'git' invocations when doing directory listing (.editorconfig code path is still hit).
Signed-off-by: Filip Navara <[email protected]>
* Use go-git for reading blobs.
Signed-off-by: Filip Navara <[email protected]>
* Make SHA1 type alias for plumbing.Hash in go-git.
Signed-off-by: Filip Navara <[email protected]>
* Make Signature type alias for object.Signature in go-git.
Signed-off-by: Filip Navara <[email protected]>
* Fix GetCommitsInfo for repository with only one commit.
Signed-off-by: Filip Navara <[email protected]>
* Fix PGP signature verification.
Signed-off-by: Filip Navara <[email protected]>
* Fix issues with walking commit graph across merges.
Signed-off-by: Filip Navara <[email protected]>
* Fix typo in condition.
Signed-off-by: Filip Navara <[email protected]>
* Speed up loading branch list by keeping the repository reference (and thus all the loaded packfile indexes).
Signed-off-by: Filip Navara <[email protected]>
* Fix lising submodules.
Signed-off-by: Filip Navara <[email protected]>
* Fix build
Signed-off-by: Filip Navara <[email protected]>
* Add back commit cache because of name-rev
Signed-off-by: Filip Navara <[email protected]>
* Fix tests
Signed-off-by: Filip Navara <[email protected]>
* Fix code style
* Fix spelling
* Address PR feedback
Signed-off-by: Filip Navara <[email protected]>
* Update vendor module list
Signed-off-by: Filip Navara <[email protected]>
* Fix getting trees by commit id
Signed-off-by: Filip Navara <[email protected]>
* Fix remaining unit test failures
* Fix GetTreeBySHA
* Avoid running `git name-rev` if not necessary
Signed-off-by: Filip Navara <[email protected]>
* Move Branch code to git module
* Clean up GPG signature verification and fix it for tagged commits
* Address PR feedback (import formatting, copyright headers)
* Make blob lookup by SHA working
* Update tests to use public API
* Allow getting content from any type of object through the blob interface
* Change test to actually expect the object content that is in the GIT repository
* Change one more test to actually expect the object content that is in the GIT repository
* Add comments
* Initial ui components for pull request review
* Add Review
Add IssueComment types
Signed-off-by: Jonas Franz <[email protected]>
(cherry picked from commit 2b4daab)
Signed-off-by: Jonas Franz <[email protected]>
* Replace ReviewComment with Content
Signed-off-by: Jonas Franz <[email protected]>
* Add load functions
Add ReviewID to findComments
Signed-off-by: Jonas Franz <[email protected]>
* Add create review comment implementation
Add migration for review
Other small changes
Signed-off-by: Jonas Franz <[email protected]>
* Simplified create and find functions for review
Signed-off-by: Jonas Franz <[email protected]>
* Moved "Pending" to first position
Signed-off-by: Jonas Franz <[email protected]>
* Add GetCurrentReview to simplify fetching current review
Signed-off-by: Jonas Franz <[email protected]>
* Preview for listing comments
Signed-off-by: Jonas Franz <[email protected]>
* Move new comment form to its own file
Signed-off-by: Jonas Franz <[email protected]>
* Implement Review form
Show Review comments on comment stream
Signed-off-by: Jonas Franz <[email protected]>
* Add support for single comments
Showing buttons in context
Signed-off-by: Jonas Franz <[email protected]>
* Add pending tag to pending review comments
Signed-off-by: Jonas Franz <[email protected]>
* Add unit tests for Review
Signed-off-by: Jonas Franz <[email protected]>
* Fetch all review ids at once
Add unit tests
Signed-off-by: Jonas Franz <[email protected]>
* gofmt
Signed-off-by: Jonas Franz <[email protected]>
* Improved comment rendering in "Files" view by adding Comments to DiffLine
Signed-off-by: Jonas Franz <[email protected]>
* Add support for invalidating comments
Signed-off-by: Jonas Franz <[email protected]>
* Switched back to code.gitea.io/git
Signed-off-by: Jonas Franz <[email protected]>
* Moved review migration from v64 to v65
Signed-off-by: Jonas Franz <[email protected]>
* Rebuild css
Signed-off-by: Jonas Franz <[email protected]>
* gofmt
Signed-off-by: Jonas Franz <[email protected]>
* Improve translations
Signed-off-by: Jonas Franz <[email protected]>
* Fix unit tests by updating fixtures and updating outdated test
Signed-off-by: Jonas Franz <[email protected]>
* Comments will be shown at the right place now
Signed-off-by: Jonas Franz <[email protected]>
* Add support for deleting CodeComments
Signed-off-by: Jonas Franz <[email protected]>
* Fix problems caused by files in subdirectories
Signed-off-by: Jonas Franz <[email protected]>
* Add support for showing code comments of reviews in conversation
Signed-off-by: Jonas Franz <[email protected]>
* Add support for "Show/Hide outdated"
Signed-off-by: Jonas Franz <[email protected]>
* Update code.gitea.io/git
Signed-off-by: Jonas Franz <[email protected]>
* Add support for new webhooks
Signed-off-by: Jonas Franz <[email protected]>
* Update comparison
Signed-off-by: Jonas Franz <[email protected]>
* Resolve conflicts
Signed-off-by: Jonas Franz <[email protected]>
* Minor UI improvements
* update code.gitea.io/git
* Fix ui bug reported by @lunny causing wrong position of add button
Add functionality to "Cancel" button
Add scale effects to add button
Hide "Cancel" button for existing comments
Signed-off-by: Jonas Franz <[email protected]>
* Prepare solving conflicts
Signed-off-by: Jonas Franz <[email protected]>
* Show add button only if no comments already exist for the line
Signed-off-by: Jonas Franz <[email protected]>
* Add missing vendor files
Signed-off-by: Jonas Franz <[email protected]>
* Check if reviewer is nil
Signed-off-by: Jonas Franz <[email protected]>
* Show forms only to users who are logged in
Signed-off-by: Jonas Franz <[email protected]>
* Revert "Show forms only to users who are logged in"
This reverts commit c083682
Signed-off-by: Jonas Franz <[email protected]>
* Save patch in comment
Render patch for code comments
Signed-off-by: Jonas Franz <[email protected]>
* Add link to comment in code
Signed-off-by: Jonas Franz <[email protected]>
* Add reply form to comment list
Show forms only to signed in users
Signed-off-by: Jonas Franz <[email protected]>
* Add 'Reply' as translatable
Add CODE_COMMENT_LINES setting
Signed-off-by: Jonas Franz <[email protected]>
* gofmt
Signed-off-by: Jonas Franz <[email protected]>
* Fix problems introduced by checking for singed in user
Signed-off-by: Jonas Franz <[email protected]>
* Add v70
Signed-off-by: Jonas Franz <[email protected]>
* Update generated stylesheet
Signed-off-by: Jonas Franz <[email protected]>
* Fix preview
Beginn with new review comment patch system
Signed-off-by: Jonas Franz <[email protected]>
* Add new algo to generate diff for line range
Remove old algo used for cutting big diffs (it was very buggy)
* Add documentation and example for CutDiffAroundLine
* Fix example of CutDiffAroundLine
* Fix some comment UI rendering bugs
* Add code comment edit mode
* Send notifications / actions to users until review gets published
Fix diff generation bug
Fix wrong hashtag
* Fix vet errors
* Send notifications also for single comments
* Fix some notification bugs, fix link
* Fix: add comment icon is only shown on code lines
* Add lint comment
* Add unit tests for git diff
* Add more error messages
* Regenerated css
Signed-off-by: Jonas Franz <[email protected]>
* fmt
Signed-off-by: Jonas Franz <[email protected]>
* Regenerated CSS with latest less version
Signed-off-by: Jonas Franz <[email protected]>
* Fix test by updating comment type to new ID
Signed-off-by: Jonas Franz <[email protected]>
* Introducing CodeComments as type for map[string]map[int64][]*Comment
Other minor code improvements
Signed-off-by: Jonas Franz <[email protected]>
* Fix data-tab issues
Signed-off-by: Jonas Franz <[email protected]>
* Remove unnecessary change
Signed-off-by: Jonas Franz <[email protected]>
* refactored checkForInvalidation
Signed-off-by: Jonas Franz <[email protected]>
* Append comments instead of setting
Signed-off-by: Jonas Franz <[email protected]>
* Use HeadRepo instead of BaseRepo
Signed-off-by: Jonas Franz <[email protected]>
* Update migration
Signed-off-by: Jonas Franz <[email protected]>
* Regenerated CSS
Signed-off-by: Jonas Franz <[email protected]>
* Add copyright
Signed-off-by: Jonas Franz <[email protected]>
* Update index.css
Signed-off-by: Jonas Franz <[email protected]>
* Add support for U2F
Signed-off-by: Jonas Franz <[email protected]>
* Add vendor library
Add missing translations
Signed-off-by: Jonas Franz <[email protected]>
* Minor improvements
Signed-off-by: Jonas Franz <[email protected]>
* Add U2F support for Firefox, Chrome (Android) by introducing a custom JS library
Add U2F error handling
Signed-off-by: Jonas Franz <[email protected]>
* Add U2F login page to OAuth
Signed-off-by: Jonas Franz <[email protected]>
* Move U2F user settings to a separate file
Signed-off-by: Jonas Franz <[email protected]>
* Add unit tests for u2f model
Renamed u2f table name
Signed-off-by: Jonas Franz <[email protected]>
* Fix problems caused by refactoring
Signed-off-by: Jonas Franz <[email protected]>
* Add U2F documentation
Signed-off-by: Jonas Franz <[email protected]>
* Remove not needed console.log-s
Signed-off-by: Jonas Franz <[email protected]>
* Add default values to app.ini.sample
Add FIDO U2F to comparison
Signed-off-by: Jonas Franz <[email protected]>