* Add API for Repo Advanced Settings of wiki and issue tracker
Signed-off-by: David Svantesson <[email protected]>
* Add some integration tests for tracker and wiki settings through API
* Should return StatusUnprocessableEntity in case of invalid API values.
* Add tests for invalid URLs for external tracker and wiki.
* Do not set inital values if they are default of type
* Make issue tracker and wiki units separate structures in Repository API structure.
Signed-off-by: David Svantesson <[email protected]>
* Fix comment of structures
Signed-off-by: David Svantesson <[email protected]>
* Rewrite API to use struct for setting tracker and wiki settings.
* LetOnlyContributorsTrackTime -> AllowOnlyContributorsToTrackTime
* Api endpoint for searching teams.
Signed-off-by: dasv <[email protected]>
* Move API to /orgs/:org/teams/search
Signed-off-by: David Svantesson <[email protected]>
* Regenerate swagger
Signed-off-by: David Svantesson <[email protected]>
* Fix search is Get
Signed-off-by: David Svantesson <[email protected]>
* Add test for search team API.
Signed-off-by: David Svantesson <[email protected]>
* Update routers/api/v1/org/team.go
grammar
Co-Authored-By: Richard Mahn <[email protected]>
* Fix review comments
Signed-off-by: David Svantesson <[email protected]>
* Fix some issues in repo collaboration team search, after changes in this PR.
Signed-off-by: David Svantesson <[email protected]>
* Remove teamUser which is not used and replace with actual user id.
Signed-off-by: David Svantesson <[email protected]>
* Remove unused search variable UserIsAdmin.
* Add paging to team search.
* Re-genereate swagger
Signed-off-by: David Svantesson <[email protected]>
* Fix review comments
Signed-off-by: David Svantesson <[email protected]>
* fix
* Regenerate swagger
* Use correct index when fetching commit status
Signed-off-by: Elias Norberg <[email protected]>
* Compare against base repo to avoid mismatch when merging from fork
Signed-off-by: Elias Norberg <[email protected]>
* extract actions on new pull request from models to pulls service
* improve code
* move code.gitea.io/gitea/modules/pull to code.gitea.io/gitea/services/pull
* fix fmt
* Rename pulls.go to pull.go
* Always return local url for users avatar
Avoids having to wait for DNS lookups when libravatar is activated
fixing #6046
* Avoid double slash in avatar link
* Move avatar route to the correct place
* Test more reserved usernames
* Add more reserved usernames, sort them
* Reserve "attachments" username (is a used route)
* It's "avatars" being reserved, not "avatar"
* 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.
* delete attachments from the database and file system
* add migration
* fix import statements
* fix package name
* remove conditional should in case the confi has been changed and the server restarted
* simplify deletion of attachments in DB
* fix CI build
* fix review
* add copyright in the proper place
* fix review
* Update ref comment
* Generate comment on simple ref
* Make fmt + remove unneeded repo load
* Add TODO comments
* Add ref-check in issue creation; re-arrange template
* Make unit tests pass; rearrange code
* Make fmt
* Filter out xref comment if user can't see the referencing issue
* Add TODOs
* Add cross reference
* Rearrange code; add cross-repository references
* Striketrhough obsolete references
* Remove unnecesary TODO
* Add "not supported" note
* Support for edits and deletes, and issue title
* Revert changes to go.mod
* Fix fmt
* Add support for xref from API
* Add first integration test
* Add integration tests
* Correct formatting
* Fix add comment test
* Add migration
* Remove outdated comments; fix typo
* Some code refactoring and rearranging
* Rename findCrossReferences to createCrossReferences
* Delete xrefs when repository is deleted
* Corrections as suggested by @lafriks
* Prepare for merge
* Fix log for errors
* refuse merge until ci successfully
* deny merge request when required status checkes not succeed on merge Post and API
* add database migration for added columns on protected_branch
* fix migration
* fix protected branch check bug
* fix protected branch settings
* remove duplicated code on check pull request's required commit statuses pass
* remove unused codes
* fix migration
* add newline for template file
* fix go mod
* rename function name and some other fixes
* fix template
* fix bug pull view
* remove go1.12 wrong dependencies
* add administrator bypass when protected branch status check enabled
* fix bug
* improve the codes
The current webhook just shows the amount of commits, but misses the actual commit description. While the code is actually there to include the description, it is just not included.
Signed-off-by: Bjoern Petri <[email protected]>
* move create release from models to a standalone package
* fix lint
* fix comment year
* fix lint
* fix lint
* fix package import name
* fix vendor
* fix go mod
* some refactors
* fix vendor
* use go1.12 make vendor
* fix vendor
* migrate gplus to google oauth2 provider. this still provides support for old gplus connections.
* Update models/oauth2.go
Co-Authored-By: Antoine GIRARD <[email protected]>
* make vendor
* Restrict repository indexing by file extension
* Use REPO_EXTENSIONS_LIST_INCLUDE instead of REPO_EXTENSIONS_LIST_EXCLUDE and have a more flexible extension pattern
* Corrected to pass lint gosimple
* Add wildcard support to REPO_INDEXER_EXTENSIONS
* This reverts commit 72a650c8e4.
* Add wildcard support to REPO_INDEXER_EXTENSIONS (no make vendor)
* Simplify isIndexable() for better clarity
* Add gobwas/glob to vendors
* manually set appengine new release
* Implement better REPO_INDEXER_INCLUDE and REPO_INDEXER_EXCLUDE
* Add unit and integration tests
* Update app.ini.sample and reword config-cheat-sheet
* Add doc page and correct app.ini.sample
* Some polish on the doc
* Simplify code as suggested by @lafriks
* feat: highlight issue references with :
e.g. #1287: my commit msg
e.g. ABC-1234: my commit msg
* ref: update model regex to consistent with issueNumericPattern
* test: check highlight issue with : in commits messages
* Create API endpoints for repo topics.
Signed-off-by: David Svantesson <[email protected]>
* Generate swagger
Signed-off-by: David Svantesson <[email protected]>
* Add documentation to functions
Signed-off-by: David Svantesson <[email protected]>
* Grammar fix
Signed-off-by: David Svantesson <[email protected]>
* Fix function comment
Signed-off-by: David Svantesson <[email protected]>
* Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match
Signed-off-by: David Svantesson <[email protected]>
* Add PUT /repos/{owner}/{repo}/topics and remove GET /repos/{owner}/{repo}/topics
* Ignore if topic is sent twice in same request, refactoring.
Signed-off-by: David Svantesson <[email protected]>
* Fix topic dropdown with api changes.
Signed-off-by: David Svantesson <[email protected]>
* Style fix
Signed-off-by: David Svantesson <[email protected]>
* Update API documentation
Signed-off-by: David Svantesson <[email protected]>
* Better way to handle duplicate topics in slice
Signed-off-by: David Svantesson <[email protected]>
* Make response element TopicName an array of strings, instead of using an array of TopicName
Signed-off-by: David Svantesson <[email protected]>
* Add test cases for API Repo Topics.
Signed-off-by: David Svantesson <[email protected]>
* Fix format of tests
Signed-off-by: David Svantesson <[email protected]>
* Fix comments
Signed-off-by: David Svantesson <[email protected]>
* Fix unit tests after adding some more topics to the test fixture.
Signed-off-by: David Svantesson <[email protected]>
* Update models/topic.go
Limit multiple if else if ...
Co-Authored-By: Antoine GIRARD <[email protected]>
* Engine as first parameter in function
Co-Authored-By: Antoine GIRARD <[email protected]>
* Replace magic numbers with http status code constants.
Signed-off-by: David Svantesson <[email protected]>
* Fix variable scope
Signed-off-by: David Svantesson <[email protected]>
* Test one read with login and one with token
Signed-off-by: David Svantesson <[email protected]>
* Add some more tests
Signed-off-by: David Svantesson <[email protected]>
* Apply suggestions from code review
Use empty struct for efficiency
Co-Authored-By: Lauris BH <[email protected]>
* Add test case to check access for user with write access
Signed-off-by: David Svantesson <[email protected]>
* Fix access, repo admin required to change topics
Signed-off-by: David Svantesson <[email protected]>
* Correct first test to be without token
Signed-off-by: David Svantesson <[email protected]>
* Any repo reader should be able to access topics.
* No need for string pointer
Signed-off-by: David Svantesson <[email protected]>
* Add Backend Logic for Toggling Email Notification
This commit adds the backend logic for
allowing users to enable or disable email
notifications. The implementation ensures
that only issue notification emails get disabled
and important emails are still sent regardless
of the setting.
The UI to toggle this setting has not yet been
implemented.
* Add UI and complete user email notification enable
This commit completes the functionality to allow
users to disable their own email notifications.
Signed-off-by: Gary Kim <[email protected]>
* Add Third Option for Only Email on Mention
Signed-off-by: Gary Kim <[email protected]>
* Readd NOT NULL to new preference string
Signed-off-by: Gary Kim <[email protected]>
* Add Tests and Rewrite Comment
Signed-off-by: Gary Kim <[email protected]>
* Allow admin to set default email frequency
Signed-off-by: Gary Kim <[email protected]>
* Add new config option to docs
Signed-off-by: Gary Kim <[email protected]>
* Fix a few mistakes
Signed-off-by: Gary Kim <[email protected]>
* Only update required columns
Signed-off-by: Gary Kim <[email protected]>
* Simplify an error check
Signed-off-by: Gary Kim <[email protected]>
* Make email_notification_preference column in DB be VARCHAR(20)
Signed-off-by: Gary Kim <[email protected]>
* Handle errors
Signed-off-by: Gary Kim <[email protected]>
* Update models/migrations/v93.go
Co-Authored-By: Lauris BH <[email protected]>
* Add description in repository search.
Signed-off-by: David Svantesson <[email protected]>
* Refactor SearchRepositoryByName with a general function SearchRepository
Signed-off-by: David Svantesson <[email protected]>
* Allow to specify if description shall be included in API repo search.
Signed-off-by: David Svantesson <[email protected]>
* Add new app.ini setting for whether to search within repo description.
Signed-off-by: David Svantesson <[email protected]>
* Search keyword in description (if setting enabled) on:
- Explore page
- Organization profile page
- User profile page
- Admin repo page
Do not search keyword in description on:
- Any non-keyword search (not relevant)
- Incremental search (uses API)
Signed-off-by: David Svantesson <[email protected]>
* Put parameters related to keyword directly after it
Signed-off-by: David Svantesson <[email protected]>
* Add test cases for including (and not including) repository description in search.
Signed-off-by: David Svantesson <[email protected]>
* Rename test function from TestSearchRepositoryByName to TestSearchRepository.
Signed-off-by: David Svantesson <[email protected]>
* Make setting SEARCH_REPO_DESCRIPTION default to true
Signed-off-by: David Svantesson <[email protected]>
* Add support for DEFAULT_ORG_MEMBER_VISIBLE
* Correct formatting
* Improved description in cheat sheet.
* Add test for DefaultOrgMemberVisible
* Remove dead code
* display ui time with customize time location
* fix lint
* rename UILocation to DefaultUILocation
* move time related functions to modules/timeutil
* fix tests
* fix tests
* fix build
* fix swagger
* Convert files to utf-8 for indexing
* Move utf8 functions to modules/base
* Bump repoIndexerLatestVersion to 3
* Add tests for base/encoding.go
* Changes to pass gosimple
* Move UTF8 funcs into new modules/charset package