You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/models/fixtures
David Svantesson 1f951cdeba Add API endpoint for accessing repo topics (#7963)
* Create API endpoints for repo topics.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Generate swagger

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add documentation to functions

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Grammar fix

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix function comment

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* 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 <davidsvantesson@gmail.com>

* Fix topic dropdown with api changes.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Style fix

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Update API documentation

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Better way to handle duplicate topics in slice

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Make response element TopicName an array of strings, instead of using an array of TopicName

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add test cases for API Repo Topics.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix format of tests

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix comments

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix unit tests after adding some more topics to the test fixture.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Update models/topic.go

Limit multiple if else if ...

Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com>

* Engine as first parameter in function

Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com>

* Replace magic numbers with http status code constants.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix variable scope

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Test one read with login and one with token

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add some more tests

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Apply suggestions from code review

Use empty struct for efficiency

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

* Add test case to check access for user with write access

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix access, repo admin required to change topics

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Correct first test to be without token

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Any repo reader should be able to access topics.

* No need for string pointer

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
..
access.yml Add search mode option to /api/repo/search (#2756) 7 years ago
access_token.yml Hash App token (#6724) 5 years ago
action.yml User action heatmap (#5131) 6 years ago
attachment.yml MySQL, Postgres integration tests in drone (#1638) 7 years ago
collaboration.yml Allow collaborators to view repo owned private org (#6965) 5 years ago
comment.yml fix 500 when reviewer is deleted with integration tests (#6856) 5 years ago
commit_status.yml Status-API (#1332) 7 years ago
deleted_branch.yml Add deleted_branch table fixture (#2832) 7 years ago
deploy_key.yml Writable deploy keys (closes #671) (#3225) 7 years ago
email_address.yml test: Add user mail testing. (#833) 8 years ago
follow.yml Fix and test for delete user (#1713) 7 years ago
gpg_key.yml Add missing fixture to clean gpg_key table (#2494) 7 years ago
gpg_key_import.yml add .gpg url (match github behaviour) (#6610) 5 years ago
hook_task.yml API endpoint for testing webhook (#3550) 6 years ago
issue.yml Add commit statuses reports on pull request view (#6845) 5 years ago
issue_assignees.yml Multiple assignees (#3705) 6 years ago
issue_label.yml Bug fixes and unit tests for models/issue_label (#802) 8 years ago
issue_user.yml Multiple assignees (#3705) 6 years ago
issue_watch.yml Hide unactive on explore users and some refactors (#2741) 7 years ago
label.yml Bug fixes and unit tests for models/issue_label (#802) 8 years ago
login_source.yml Add LDAP integration tests (#3897) 6 years ago
milestone.yml Add state param to milestone listing API (#7131) 5 years ago
notice.yml Unit tests for models/admin 8 years ago
notification.yml Add 'mark all read' option to notifications (#3097) 7 years ago
oauth2_application.yml Integrate OAuth2 Provider (#5378) 5 years ago
oauth2_authorization_code.yml Integrate OAuth2 Provider (#5378) 5 years ago
oauth2_grant.yml Integrate OAuth2 Provider (#5378) 5 years ago
org_user.yml org/members: display 2FA members states + optimize sql requests (#7621) 5 years ago
protected_branch.yml Don't recreate database in integration tests (#1697) 7 years ago
public_key.yml Fixtures for public_key table (#3140) 7 years ago
pull_request.yml Add commit statuses reports on pull request view (#6845) 5 years ago
reaction.yml Add reactions to issues/PR and comments (#2856) 7 years ago
release.yml Fix release display and correct paging (#2080) 7 years ago
repo_indexer_status.yml Code/repo search (#2582) 7 years ago
repo_redirect.yml Unit tests for repo redirects (#961) 7 years ago
repo_topic.yml Add API endpoint for accessing repo topics (#7963) 5 years ago
repo_unit.yml Fix 404 when send pull request some situation (#6871) 5 years ago
repository.yml Include description in repository search. (#7942) 5 years ago
review.yml fix 500 when reviewer is deleted with integration tests (#6856) 5 years ago
star.yml Unit tests for models/star (#752) 8 years ago
stopwatch.yml Feature: Timetracking (#2211) 7 years ago
team.yml org/members: display 2FA members states + optimize sql requests (#7621) 5 years ago
team_repo.yml Restrict permission check on repositories and fix some problems (#5314) 6 years ago
team_unit.yml Restrict permission check on repositories and fix some problems (#5314) 6 years ago
team_user.yml org/members: display 2FA members states + optimize sql requests (#7621) 5 years ago
topic.yml Add API endpoint for accessing repo topics (#7963) 5 years ago
tracked_time.yml Feature: Timetracking (#2211) 7 years ago
two_factor.yml org/members: display 2FA members states + optimize sql requests (#7621) 5 years ago
u2f_registration.yml Add support for FIDO U2F (#3971) 6 years ago
user.yml Add Ability for User to Customize Email Notification Frequency (#7813) 5 years ago
user_open_id.yml Show user OpenID URIs in their profile (#1314) 7 years ago
watch.yml Hide unactive on explore users and some refactors (#2741) 7 years ago
webhook.yml Bug fixes and unit tests for models/webhook (#751) 8 years ago