* Api endpoint for searching teams.
Signed-off-by: dasv <david.svantesson@qrtech.se>
* Move API to /orgs/:org/teams/search
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Regenerate swagger
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Fix search is Get
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Add test for search team API.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Update routers/api/v1/org/team.go
grammar
Co-Authored-By: Richard Mahn <richmahn@users.noreply.github.com>
* Fix review comments
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Fix some issues in repo collaboration team search, after changes in this PR.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Remove teamUser which is not used and replace with actual user id.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Remove unused search variable UserIsAdmin.
* Add paging to team search.
* Re-genereate swagger
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Fix review comments
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* fix
* Regenerate swagger
* 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>
* Add 'make revive' to instructions for checking code
This is performed on drone, hacking instructions should contain the same to avoid unnecessary PR builds.
* lint is deprecated. Denote revive +vet as code analysis in continuous text.
* Add logging for when user requested attachment doesn't belong to the specified release.
* Fix API to use correct variable for release asset (attachment)
* 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
* doc py3-zmq - ZeroMQ bindings for jupyter
#7970https://github.com/go-gitea/gitea/issues/7970
* rebase Dockerfile to 1.9.x for jupyter
* [docs] external-renderers.en-us.md - use templated variable for version
Co-Authored-By: techknowlogick <matti@mdranta.net>
* 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 <davidsvantesson@gmail.com>
* Add option for repository admins to change teams access to repo.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Add comment for functions
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Make RepoAdminChangeTeamAccess default false in xorm and make it default checked in template instead.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Make proper language strings and fix error redirection.
* Add unit tests for adding and deleting team from repository.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Add database migration
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Fix redirect
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Fix locale string mismatch.
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* 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