Граф коммитов

1382 Коммитов

Автор SHA1 Сообщение Дата
Lisa Chan 19c1524fe8
RE: Add API documentation for homepage shelves (#16087)
* Added homepage shelves to API docs

* Updated API doc based on feedback
2021-01-05 15:26:36 +00:00
Andrew Williamson 860cd8cc4b
return default and requested locale in dict responses in v5+ api (#16103) 2020-12-04 14:28:57 +00:00
Mathieu Pillard 6b7caa4632
Add ability to restrict add-on detail/version API and downloads in specific regions (#15965)
* Add ability to restrict add-on detail/version API and downloads in specific regions

* Document that we can return a 451 error in the API

* Pass a country code as the tests expect

* Add Link header to 451 responses
2020-11-12 14:18:26 +01:00
William Durand bdbfe71115
Add basic code to receive Stripe events (webhook) (#15901) 2020-11-04 15:22:30 +01:00
Andrew Williamson b222dfa200
drop heading, heading_text, description from discovery api (#15856)
* drop heading, heading_text, description from discovery api

* bump the migration (and don't need to drop recommendable field now)

* turn off 'disco-heading-and-description-shim' in v4
2020-10-29 13:47:36 +00:00
Andreas Wagner e159570f1d
Update permissions in docs (#15796) 2020-10-26 13:07:29 +01:00
Andrew Williamson 1c552143c0
Add conversion tracking to Adzerk; refactor click into generic events (#15768)
* Add conversion tracking to Adzerk; refactor click into generic events

* rename events to event_data
2020-10-19 18:19:06 +01:00
Andrew Williamson 12fe18219f
exposed promoted in primary hero api addon object (#15764) 2020-10-19 11:33:21 +01:00
Andrew Williamson 6ffba9a355
implement click proxy for adzerk (#15704)
* implement click proxy for adzerk

* docs update
2020-10-13 18:47:11 +01:00
William Durand d326c652d4
Add-on summary/description might contain HTML tags (#15713) 2020-10-13 15:53:19 +02:00
Andrew Williamson dfcde84625
implement impression api endpoint for sponsored shelf (#15687)
* implement impression api endpoint for sponsored shelf

* update docs for impression endpoint
2020-10-12 11:11:29 +01:00
Andrew Williamson 92f3acc5da
add sponsored shelf that uses Adzerk for placement (#15670)
* add sponsored shelf that uses Adzerk for placement

* cleanup of some commented out code

* log a broken json response as an adzerk fail too

* totally not just renaming the test class to work around an ES indexing bug

* change to use mixins instead of subclassing TestESAddonSerializerOutput
2020-10-08 12:54:29 +01:00
Andreas Wagner d131f3c78d
Add option to subscribe to unlisted submissions (#15606) 2020-10-06 11:49:24 +02:00
Mathieu Pillard 28d9862a5f
Always create appversions for both Firefox and Firefox for Android (#15644)
We need to keep both in sync because in manifests the distinction
doesn't exist, and validation is currently performed assuming
compatibility for both applications.
2020-10-06 11:14:50 +02:00
William Durand cd17f03ac1
Remove documentation about download sources (#15512) 2020-09-17 11:26:29 +02:00
Andrew Williamson a06f104cbf
add ?promoted=badged search filter (#15478) 2020-09-14 17:39:13 +01:00
Andrew Williamson 6630f2fdcf
drop recommended=true filter from addons api (#15470)
* drop recommended=true filter from addons api

* docs fix
2020-09-11 18:06:56 +01:00
Andrew Williamson 5648e2f8ed
allow random addon sort to be used with promoted filter (#15469) 2020-09-11 10:57:22 +01:00
Andrew Williamson e2f6c622c8
Extend ?promoted= addon api filter to support multiple groups (#15448)
* Extend ?promoted= addon api filter to support multiple groups

* review nits
2020-09-11 09:23:08 +01:00
Andrew Williamson 0e04571c66
drop is_recommended from api addon detail (#15436) 2020-09-10 17:21:25 +01:00
Mathieu Pillard 6d489031b7
Remove unstability disclaimer from applications API documentation (#15430) 2020-09-07 16:39:15 +02:00
Andrew Williamson b1fa006974
promoted addon search api filter (#15324)
* promoted addon search api filter

* test all the groups; limit param values to enabled groups
2020-08-18 17:39:01 +01:00
Bob Silverberg 190a903de6
Update API code to return data about promoted add-ons (#15222) 2020-08-11 12:01:22 -04:00
Mathieu Pillard 33150ea181
Change appversions API to only be available through external auth (#15217)
* Change appversions API to only be available through external auth

* Fix flake8
2020-08-06 17:55:49 +02:00
Mathieu Pillard 4ae3c35417
Add internal API to create AppVersions (#15198)
* Add internal API to create AppVersions

* Add missing test for 403

* Remove commented breakpoint call

* Add missing appversion in test_alpha_star_already_exists() test
2020-08-06 15:20:23 +02:00
Mathieu Pillard 66348f6b01
Remove views/code about info requests (#15168)
* Remove views/code about info requests

Info requests are no longer possible, replaced with delayed rejections
(or simple reviewer reply with no deadline).

* Move migration

* Remove `request` from VersionForm, it's no longer needed
2020-08-05 14:29:34 +02:00
Andrew Williamson 00e0b4c1ae
update addons docs to mention that type search filter supports multiple values (#15114) 2020-07-30 12:34:16 +01:00
Bob Silverberg 901bbd41b1
Expose optional permissions in the Addon API (#15047) 2020-07-27 11:43:10 -04:00
Andrew Williamson ac50305b57
drop Block.include_in_legacy and derive legacy state from legacy_id (#15043) 2020-07-27 10:47:51 +01:00
Andrew Williamson 2a842fa808
reimplement description in PrimaryHeroShelf object (#14964)
* reimplement description in PrimaryHeroShelf object

* add ?raw param to primary endpoint to output l10nizable strings
2020-07-20 13:03:21 +01:00
William Durand b84b8f9892
Expose model_version in scanners API response (#14970) 2020-07-16 17:57:37 +02:00
Mathieu Pillard 2f710df2eb
Add new reviewer flag to disable auto-approval until the next manual approval (#14911)
* Add new reviewer flag to disable auto-approval until the next manual approval

This will be used by delayed review rejections to "pause" listed auto-approvals
for an add-on until the next version that fixes the issues noted by the reviewer
is approved.

* Bump migration

* Test for the field being False
2020-07-15 16:06:25 +02:00
William Durand 385fef4f94
Add created field in ScannerResultSerializer (#14877) 2020-07-07 18:38:14 +02:00
William Durand 3bca5ac25f
Update scanners API docs (#14776) 2020-06-30 10:57:12 +02:00
Andrew Williamson acaff670b2 extra blurb about deleting informatoin 2020-06-23 10:44:53 +01:00
Andrew Williamson b92e5e16aa update accounts delete API docs too 2020-06-23 09:50:09 +01:00
Bob Silverberg 3781ee0233
Remove `version` from retrieve and list draft_comments API responses (#14361) 2020-05-29 07:41:16 -04:00
Mathieu Pillard 4619939d64
Merge pull request #14373 from diox/send-fxa-id-and-not-email-to-basket-user-sync
Send fxa_id, not email, in user basket sync
2020-05-25 13:45:44 +02:00
Mathieu Pillard 14881955c0 Send fxa_id, not email, in user basket sync
Salesforce already have FxA data so it's best not to send the email
as it would be duplicate info anyway. FxA is the source of truth for
emails.
2020-05-25 13:04:35 +02:00
Lisa Chan 9153487c23
RE: Update install doc regarding elasticsearch timed out error (#14357) 2020-05-21 15:44:05 -04:00
Bob Silverberg f441e0fc5a
Move the `entries` from the `file` object into the version object for Browse and Compare APIs (#14218) 2020-05-19 10:48:13 -04:00
Bob Silverberg 5f06ebe6b6
Update Browse and Compare API endpoints to allow for `file_only` (#14163) 2020-05-06 08:25:13 -04:00
Bob Silverberg fed8ca24a3
Remove unnecessary file properties from reviewers API responses (#14105) 2020-04-30 14:34:02 -04:00
Andrew Williamson 005da78a07
Merge pull request #14083 from eviljeff/14018-blocklist-docs
document AMOs blocklist implementation
2020-04-29 16:34:12 +01:00
Bob Silverberg bfd3b046af
Remove properties from entries, and do not require entries to calculate file-level properties (#14043) 2020-04-28 11:42:27 -04:00
William Durand e077b8bea7
Add filters to the scanners api endpoint (#14078) 2020-04-28 16:28:13 +02:00
Andrew Williamson c7a05188e2 spelling! 2020-04-28 14:29:21 +01:00
Andrew Williamson 5a3ceb74d4 document AMOs blocklist implementation 2020-04-28 14:17:52 +01:00
Bob Silverberg 44928e107c
Add sha256, mimetype and size to File information returned by reviewers APIs (#14031) 2020-04-23 10:09:36 -04:00
Shashwat S 51f193da06 Update install docs for Windows
In case a developer is using Docker Desktop for Windows then
the containers don't prepare /etc/hosts file. Additionally,
elasticsearch faces OOM errors so added a Gotcha for this.
2020-04-12 19:26:40 +05:30
Andrew Williamson 1152b0784d
Expose add-on name in blocklist/block api (#13786)
* Expose add-on name in blocklist/block api

* add a generic test in api/tests/test_fields.py
2020-03-20 11:17:24 +00:00
Christopher Grebs 41f17af6ad
Expose file.id in compare endpoint. (#13740)
* Expose file.id in compare endpoint.

Fixes #13650

* Actually, expose the file id, not the version id.

* Rename to base_file_id, fix a few other doc typos

* Small refactor, use a nested serializer to render an actual object for base_file

* Fix naming
2020-03-17 19:58:23 +01:00
Andrew Williamson d54dc781dc
add blocklist/block api (#13737)
* add blocklist/block api

* refactor test_serializer.py
2020-03-17 09:23:21 +00:00
Christopher Grebs e3e846a086
Add information about whether a file is minified to the review… (#13661)
* Add information about whether a file is minified to the reviewers API.

Fixes #13589

* Add documentation

* experiment, don't delete all validation objects

* Fix how we're fetching the FileValidation, use parent.current_file.pk

* Increase num queries check for now

* Avoid that extra query
2020-03-16 14:50:40 +01:00
Mathieu Pillard 7f85510195
Remove unnecessary version properties from APIs used by code-manager (#13658)
* Remove unnecessary version properties from APIs used by code-manager

* Fix queries optimizations and expectations
2020-03-06 20:23:49 +01:00
Mathieu Pillard 9cc031333c Switch from IRC to Matrix 2020-02-21 11:02:29 +01:00
Mathieu Pillard 66a19078e5 Add addon_install_source_url parameter to abuse report API 2020-02-12 11:34:38 +01:00
William Durand b28864c20b
Add admin buttons to allow/deny resubmission in the reviewer tools (#13425)
* Add methods to the Addon model to deal with DeniedGuid

* Update reviewers.js with new button IDs

* Add new reviewer API endpoints

* Add new buttons to allow/deny resubmission

The `Addon.is_guid_denied()` method is now a prop.

* linting fixes

* move new buttons to the right

* resubmission buttons are red now
2020-02-07 12:53:31 +01:00
William Durand ef03f216c8
Expose `label` in scanner results API endpoint (#13343) 2020-01-29 11:38:01 +01:00
William Durand 95d694b45f
Add a new API endpoint for ScannerResult(s) (#13335) 2020-01-24 15:14:43 +01:00
Christopher Grebs 6bd7ad9d50
Remove UI test code (#13245)
Remove UI test code
2020-01-16 06:06:54 +01:00
Christopher Grebs d98a9397d0
Only calculate sha256 hash of currently selected file. (#13237)
* Only calculate sha256 hash of currently selected file.

This will calculate the hash only for the currently selected file which
will reduce the delay of the initial request significantly because we
won't have to calculate sha256 hashes for hundreds of files.

The additional calculation time when selecting a file should be fairly
low because we already have the content in memory and the code-manager
does prefetch some usual usage patterns which will ensure most of the
data is already rendered.

Fixes #12920

* Update docs

* Fix flake8

* Fix typo
2020-01-14 17:16:09 +01:00
dbxnr fd9bc77c2f Remove references to selenium 2020-01-13 23:24:33 +00:00
mirefly f838f6f704 Fix pytest.org link in docs 2020-01-05 23:06:21 -07:00
Andrew Williamson 70a2c8e98a
rm featured in the v4 api/shim in v3 api (#12949) 2019-11-25 16:06:36 +00:00
Christopher Grebs e2e5423286
Improve documentation regarding filename and it's absolute val… (#12929)
* Improve documentation regarding filename and it's absolute value.

Fixes #12608

* Use 'full' instead of 'absolute'
2019-11-21 13:03:19 +01:00
Mathieu Pillard 9ddf2c0e14
Refactor unlisted submission to go through auto-approval workflow (#12658)
Refactor unlisted submission to go through auto-approval workflow

Because unlisted versions can be submitted when the add-on is
disabled, this forces us to consider them as candidates for
auto_approve, but reject them later during processing.
2019-11-13 11:59:07 +01:00
junngo 2968b71a1f drop is-source-public field except for v3 api 2019-11-12 00:23:51 +09:00
Mathieu Pillard a877485c27 Add 'AMO' as a valid report entry point in abuse reports 2019-10-29 12:49:30 +01:00
Andrew Williamson f6dafeb47a
move /authenticate api endpoint to new versionless api; update clients (#12570) 2019-10-11 17:20:43 +01:00
yatinmaan b3dbab3523 Update docs 2019-10-06 00:16:54 +05:30
Andrew Williamson c4f0e8964e wrap secondaryhero urls in outgoing if wrap_outgoing_links specified 2019-09-26 11:15:31 +01:00
Andrew Williamson 9c40be32af
remove requirement that primary hero featured image should be set (#12414) 2019-09-24 16:55:20 +01:00
Christopher Grebs 0bd4815d37
Upgrade Celery to 4.3 (#12073)
Upgrade Celery to 4.3.0

This PR upgrades to Celery 4.3, introduces a small hack because of a regression in celery.

This PR does not introduce any helpers to make use of celery workers inside the tests, we delayed that to a later point to unblock the upgrade.

This PR does fix some inconsistencies with elasticsearch mocks along the way as they were making some tests fail (see comment logs), the mocks are now applied and rolled back much less than before which makes them easier to reason about and to debug.

Notes:

 * acks_late now doesn't acknowledge in case of failures or timeouts (which is the case for index_addons). We could use task_acks_on_failure_or_timeout but I figured the new behavior should be fine.
 * any CELERY_ALWAYS_EAGER setting in local_settings.py must be replaced by CELERY_TASK_ALWAYS_EAGER

commit log:

* Implement proper wait_for_tasks helper, make TestTaskQueued work with celery worker
* Revert changes removing threading code from es reindex tests
* Fix es reindex test, correct always eager usage.
* Small cleanups, fix docs, don't reload session worker.
* Ensure docker-compose celery result doesn't use the same database as any potential tests
* Monkeypatch for celery regression
* Actually use our own app where all tasks are already bound to. This also enables logging
* Experiment: Group celery worker tests together with elasticsearch and dont run them multitasked
* Remove envlist as it doesn't add anything to our specific setup
* Fix es-and-celery marker selection
* Remove completely redundant tests
* Fix hanging tasks, let's see what travis thinks... I'll follow up with cleanups and much more docs once tests are actually succeeding
* Define celery.ping in amo.celery, use redis result backend
* Cleanup celery worker implementation a bit.

Mimic our usage of elasticsearch specific tests, this avoids various
necessary workarounds and environment cleanups because django handles
things like settings properly in the first place.

* Untangle es mocks a bit, raise error in case of not properly stopped patches.
* Re-implement state test by using celery manager to wait for results
* Explicitly re-reinitialize the workers event loop and dont reuse anything existing
* Remove celery worker thread specific code.
* Reset default celery result backend setting
2019-09-18 17:36:01 +02:00
Andrew Williamson 3f41adb7a2
expose site_status in UserProfileSerializer and /site/ (#12356) 2019-09-16 14:26:20 +01:00
Christopher Grebs af1f6b439b Re-use AddonBrowseVersionSerializer for DraftComment API.
Fixes #12275
2019-09-06 21:20:04 +02:00
Stuart Colville d219e84688
Move templates to .github dir (#12291)
* Move templates to .github dir

* Fix path
2019-09-06 15:01:11 +01:00
Christopher Grebs 09750c8517
Correct canned_response description, document response values. (#12278)
* Correct canned_response description, document response values.

Also document possible null values.

Fixes #12263
Fixes #12087

* Use a definition list instead of duplicated data.

* Add more information about nullable values.
2019-09-05 15:12:45 +02:00
Andrew Williamson 912dc79a9a
updated primary hero shelf api to return raw description with <blockquote> (#12254) 2019-09-02 16:28:18 +01:00
Christopher Grebs 4001f6716a
Fix typo in api docs for linking a canned-response to a draft comment.
Fixes #12237
2019-09-02 10:56:29 +02:00
Andrew Williamson 1341d39f8c
correct secondary hero api response in docs (#12233) 2019-08-30 17:37:35 +01:00
Mathieu Pillard 208f7e17f8
Merge pull request #12222 from diox/fix-abuse-report-api-app-profile
Fix abuse report API docs & app_profile value for install source
2019-08-30 14:00:58 +02:00
Mathieu Pillard c0a5905f3d Fix abuse report API docs & app_profile value for install source 2019-08-30 12:02:48 +02:00
Andrew Williamson 6748a96134
move all the make commands that operate on a single container to Makefile-docker (#12121)
* move all the make commands that operate on a single container to Makefile-docker

* add default user to Dockerfile

* revert the PYTHON_COMMAND var change
2019-08-29 12:10:25 +01:00
Mathieu Pillard abb7719af0 Add AbuseReport.addon_install_source ; relax addon_install_method
AbuseReport.addon_install_source is added to match what Firefox
has internally, and to help support future versions that may
introduce new possible values, the AbuseReport serializer now
accepts unknown values for addon_install_method and
addon_install_source and turns them into "other" instead of
returning a 400.
2019-08-23 15:58:47 +02:00
Christopher Grebs f5653ba68a
Implement new `canned_response` relationship in draft comments. (#12156)
* Implement new `canned_response` relationship in draft comments.

This also updates the api changelog along the way with a few things I
forgot to add in the past.

Fixes #11320
Fixes #11807

* Fix flake8

* Add missing migration
2019-08-21 17:13:04 +02:00
Mathieu Pillard b45cadd444
Add task to synchronize user/add-on data with Basket (#12148)
Add task to synchronize user/add-on data with Basket
2019-08-20 16:00:25 +02:00
Andrew Williamson 3631e196ed
change primary hero gradients to be photon color names instead of hex colors (#12135)
* change primary hero gradients to be photon color names instead of hex colors

* reword reference to photon colors in the docs
2019-08-20 13:12:10 +01:00
Andrew Williamson 0c9624b27e
l10n for secondary hero shelves (#12105)
* Expand extract_disco_strings to extract hero shelf content too

* add l10n support to seconday hero API
2019-08-16 17:22:27 +01:00
Andrew Williamson 0e7152107c
Remove CompatOverride models and api (#12086) 2019-08-12 12:36:07 +01:00
Andrew Williamson 2963e41224
add secondary hero modules (#12068)
* add secondary hero modules

* Rename 1114-add-secondary-hero-module.sql to 1115-add-secondary-hero-module.sql
2019-08-12 12:30:02 +01:00
Andrew Williamson 8c7052b9ea
drop unneeded heading from primary hero api detail (#12053) 2019-08-08 13:07:24 +01:00
Andrew Williamson 18a805baa7
remove more (all?) personas cruft (#12031)
* remove more (all?) personas cruft

* _ADDON__PERSONA to _ADDON_PERSONA
2019-08-06 19:39:20 +01:00
Andrew Williamson 55ecb3bdf3
add secondaryhero shelf - shelf&blurb (#11988) 2019-08-06 14:48:55 +01:00
Christopher Grebs 1a52fb9a8b
Do not expose heading_text in the discovery pane serializer. (#12025)
* Do not expose heading_text in the discovery pane serializer.

Fixes #11817

* Update help text.

* Update API docs

* Actually commit removing heading_text
2019-08-06 12:40:53 +02:00
Andrew Williamson 04727d7c1c
optimize queries made per hero api request (#12004) 2019-08-02 13:09:49 +01:00
Andrew Williamson ea8ac4633a
allow externally hosted addons to be added as PrimaryHero shelves (#11970) 2019-08-02 11:19:10 +01:00
Andrew Williamson 2326fdc902
add MozillaOnline as an alias for china in /discovery/ api endpoint (#11951) 2019-07-30 10:49:58 +01:00
Abhi-khandelwal f8fb33ff4c update documentation and remove scripts/hash_requirements.py 2019-07-23 23:17:26 +05:30
Andrew Williamson ab3979e238
Merge pull request #11858 from eviljeff/11842-primary-hero-shelf-model-api
create primary hero shelve model, serializer, view
2019-07-23 16:20:43 +01:00
Andrew Williamson 53f56d7813 update api docs too 2019-07-22 18:24:10 +01:00
Andrew Williamson 8483d30f7c add discovery=true filter to discovery editoral endpoint 2019-07-18 17:15:06 +01:00
Andrew Williamson c00d2684df create primary hero shelve model, serializer, view 2019-07-18 14:26:06 +01:00
Christopher Grebs 2de22598bd
Remove all usage of 'six' and as much compat code as I could f… (#11730)
* Remove all usage of 'six' and as much compat code as I could find.

Cleans up some imports along the way.

Fixes #11728

* Fix typo

* Fix rta related code paths, I actually misread the comment…

* Move ResourceWarning filtering to setup.cfg
2019-07-16 12:01:31 +02:00
Christopher Grebs a34a0b5630
Revamp draft comments API. (#11808)
* Completely revamp draft comments API.

Revamp how draft comments work, store multiple comments per version and
paginate them.

This also implement PATCH to update a comment, updates DELETE, GET
and POST endpoints properly and updates the documentation accordingly.

Fixes #11380
Fixes #11379
Fixes #11378
Fixes #11374

* Fix statuscode in docs

* Fix docs, use regular VersionSerializer

* Allow filename and lineno to be optional.

* Add note about lineno should be specific to the version, not the parent.

* Fix test to use regular VersionSerializer

* Fix test to test that the 'id' is set properly now

* Add more details to pagination, add detail endpoint for comments.

* Use user_factory
2019-07-12 16:58:31 +02:00
Andrew Williamson 9332bb8723 drop LWT specific properties from serializers 2019-06-25 20:05:45 +01:00
Christopher Grebs 82b65dc2cb Compare API: Render unmodified files.
Currently we followed how ``git diff`` works and didn't render any
changes for unmodified files.

To fix some frontend issues we now need to include unmodified files.
That alone would not render their contents, so we're including a faked
hunk that shows all lines as unmodified.

Fixes #11639
2019-06-21 06:13:04 -07:00
Andrew Williamson 31d0c3df85 stop supporting sort in the autocomplete api 2019-06-19 22:35:10 +01:00
Mathieu Pillard fd99adddfe Make abuse report API string limitations warning more prominent in docs 2019-06-12 17:20:54 +02:00
Mathieu Pillard fd39312ed3 Change abuse report API file_uri add_install_method into file_url
This is to match the value actually used by Firefox.
2019-06-11 13:52:25 +02:00
Andrew Williamson dcfff013a3 Add extra handling to sorting with recommended and relevance 2019-05-27 16:58:01 +01:00
Andrew Williamson 43d0062c82 default sort should have been changed to users 2019-05-21 10:32:13 +01:00
Andrew Williamson fa5ba91601 add recommended as a sort, and default to recommended, downloads 2019-05-17 18:08:41 +01:00
Andrew Williamson 983a751f68
Merge pull request #11459 from eviljeff/11457-random-sort-for-recommended
allow random sort to be used with recommended too
2019-05-16 17:21:59 +01:00
Andrew Williamson 8eb8fa82a2
Merge pull request #11437 from eviljeff/11068-recommended-search-flag
add recommended search flag
2019-05-16 17:18:39 +01:00
Andrew Williamson 95ea995d17 allow random sort to be used with recommended too 2019-05-16 16:07:11 +01:00
Andrew Williamson ed2c155b52
rename the org we work for 🙄 2019-05-16 15:16:41 +01:00
Andrew Williamson 41be103b28 expose is_recommended in autocomplete API too 2019-05-16 14:58:17 +01:00
William Durand 95d85feaf4
Update API changelog with new reviewers endpoints (#11455) 2019-05-16 15:41:42 +02:00
Andrew Williamson 06192d6dcb add recommended search flag 2019-05-15 15:42:08 +01:00
Christopher Grebs b0013d0914
Expose canned responses through API (#11405)
* Expose canned responses through API

Fixes #11276

Requires #11404 to be merged first

* Make sure category is serialized as a string

* Small cleanup

* Fix tests and docs
2019-05-14 19:01:23 +02:00
William Durand 203d264283 Return diff as an object or null, not an array (#11402)
* Return diff as an object or null, not an array

* add comment
2019-05-13 10:10:37 -04:00
Andrew Williamson 7c2d81868c
reword the API docs mentioning the API versions (#11369) 2019-05-09 13:42:33 +01:00
Christopher Grebs 5cc734bb39
Implement a new draft-comment model. (#11353)
* Implement a new draft-comment model.

This new model will be used to present draft-comments written in the
code-manager and displayed during review.

The related rest-api comes in a second step.

Fixes #11319
Fixes #11277

Refs mozilla/addons-code-manager#112

* Smaller fixes, implement API

* Implement GET, add docs

* Fix accidentally dropped line

* Fix migration naming

* Add user constraint

* Fix permissions, correct querying of user

* Put 'PUT' related code into elif block

* Fix CI
2019-05-08 15:03:34 +02:00
William Durand 1dabe26160
Fix download_url when requested file is known but does not exist in the tree anymore (#11368) 2019-05-08 14:12:20 +02:00
Andrew Williamson 02fe0a4275
v4dev to v5; available on all confs now (#11331) 2019-05-07 18:46:31 +01:00
Christopher Grebs 5ea74c7896
Remove download endpoint reviewer docs
Fixes #11355
2019-05-07 14:05:37 +02:00
Andrew Williamson 175f75f042
Add model support for recommendations (#11275) 2019-05-03 13:05:06 +01:00
Mathieu Pillard 7af78f4c96
Merge pull request #11274 from diox/discopane-extra-metadata
Add more addon data and text variants of heading/description to discopane API
2019-04-29 15:26:55 +02:00
Mathieu Pillard 51832207ea Documentation for the API changes 2019-04-29 15:08:29 +02:00
Mathieu Pillard 210b1bc7cd Adjust abuse API parameter constants to match what Firefox has
See https://bugzilla.mozilla.org/show_bug.cgi?id=1543377
2019-04-26 13:21:36 +02:00
Mathieu Pillard 5ced08385f Fix abuse docs build 2019-04-17 10:17:09 +02:00
Mathieu Pillard e727c1cbe7 Update abuse API parameters (again) to match the latest PRD 2019-04-16 10:01:43 +02:00
Mathieu Pillard 746bfe56f6
Merge pull request #11192 from diox/update-abuse-api-report-categories
Update abuse API parameters to match the latest PRD
2019-04-15 12:58:51 +02:00
Christopher Grebs be35a328f9 Indicate file status in file.entries. (#11124)
Indicate file status in file.entries.

We're now adding a new `status` property to `file.entries` which
indicates the git status of the file.

This will make it easier to show added/deleted/removed files.

This does not yet cover renamed/copied status as this will happen in #10849

Fixes #11123
2019-04-15 11:40:03 +02:00
Mathieu Pillard 308c1d9236 Update abuse API parameters to match the latest PRD 2019-04-15 10:21:46 +02:00
Christopher Grebs c7f5abba8d
Return absolute url for validation_url{_json}
Fixes #11034
2019-04-04 07:06:04 +02:00
Mathieu Pillard 49ffbfb213
Merge pull request #11088 from diox/reviewer-alias
Add reviewer name alias for reviewers to hide their actual name
2019-04-03 13:02:10 +02:00
Mathieu Pillard 9cb281d939 Documentation fixes 2019-04-02 18:06:11 +02:00
pyup.io bot aff5379254 Update sphinx to 2.0.0 (#11057) 2019-04-02 16:12:39 +01:00
Benjamin Forehand Jr 241c59e2d5
Update docs for new procedures regarding integration testing. (#11076)
* Update docs for new procedures regarding integration testing.

* Add section for setup.

* Add setup command to makefile-os.
2019-04-01 20:45:40 -04:00
Mathieu Pillard 10bc305de5 Don't expose useless id/username/url in v4 API - add shim for v3 2019-04-01 15:21:07 +02:00
Mathieu Pillard efa4b09852 Documentation for the reviewer_name field in account API 2019-04-01 15:20:23 +02:00
Mathieu Pillard 90c8201eb9 Add reviewer name alias for reviewers to hide their actual name
It's used when exposing reviewer name to developers for reviewer
actions - regular actions still use the normal name, even when
made by a reviewer.
2019-04-01 13:07:12 +02:00
Christopher Grebs 1a7217dcfa
Implement file.download_url for reviewer apis (#10969)
Fixes #10877
2019-03-20 17:02:12 +01:00
Andrew Williamson 9d7eeac95c
Fix small mistake in account notification unsubscribe docs 2019-03-12 11:11:40 +00:00
Andrew Williamson 077126cd57
add email unsubscribe api endpoint (#10902) 2019-03-11 13:16:52 +00:00
Christopher Grebs 8f8b03be21
Implement compare API.
This implements fetching a diff by pathspec, we need to implement this
upstream so it's implemented as a workaround for now.

This remoes support for copy and rename finding for now. I filed #10849
to fix this properly in a separate step.

The actual diff output format is hard-coded and not yet implemented as
serializers for now which makes experimenting much easier in case we
need to adapt the format depending on how the client implements it.

Fixes #10323
2019-03-11 10:53:13 +01:00
Mathieu Pillard ca589c6194 More abuse API docs fixes (appversion had wrong description) 2019-03-05 14:17:27 +01:00
Mathieu Pillard b4de38f1df Fixes for typo/bad copy pasting in abuse API docs 2019-03-05 10:54:55 +01:00
Shivam Singhal 3f247f4d41 Update django-multidb-router terminology (#10773) 2019-03-01 10:37:13 +00:00
Mathieu Pillard 7f41ad1cf4 Tweak abuse reporting API fields to match existing API and PRD updates
We now have the expected values for some of the fields. In addition,
some of the fields that had equivalents in our other APIs are renamed
to match the rest of the API better.
2019-02-25 15:34:57 +01:00
Christopher Grebs f8d9198b50
Implement mimetype categorization for easier file-type / preview detection (#10750)
This implements more advanced file-type detection based on `python-magic` thus we don't rely on the files extensions anymore but actually verify their content (header) before serving it to the client and reviewer.

Fixes #10685  (and actually rewrites it's meaning)
2019-02-22 14:01:44 +01:00
Mathieu Pillard c3511037e8 Fix abuse API docs missing backticks 2019-02-20 15:28:48 +01:00
Mathieu Pillard a768edd15b Augment the Abuse Report API with new fields
Those new fields are meant to be used for add-on reporting from
within Firefox itself.
2019-02-19 15:04:47 +01:00
Christopher Grebs 1352908bcf
Expose version list for diffing, rework reviewers api to be more concise (#10684)
* Expose version list for diffing, rework reviewers api to be more concise

We're now mounting any listing/browsing/future diffing APIs under the
already existing addon/<addon_id>/ endpoint which makes the whole
reviewer APIs behave more consistently.

Also implements the listing of versions that can be used for browsing
and diffing.

Fixes #10432

* Simplify view, don't rely on @action decorator but just make it the detail view

* Smaller cleanups, fix permissions

* More smaller cleanups, split list/retreive better

* Fix link in docs

* Improve tests, remove 'should_show_channel' and 'url'

* Smaller performance optimization

* Fix flake8

* Improve docs
2019-02-15 15:53:09 +01:00
Mathieu Pillard 1d559fcd32
Fix codestyle and docs jobs (#10683)
* Fix docs for python 3

* Make travis behave like it's inside our container, fix tox/makefile accordingly

* Fix docs build by choosing another label than _search (which is already used)

* Fix codestyle linter issues

* Remove extra force_bytes import

* Add ignore for int|null in docs as it's used in a couple places and it's valid

* Fix more docs build failures in reviewers.rst

Also build docs with -W by default to make future docs breakage
easier to spot locally.

* Leave -f Makefile-docker for UI Tests as they are not running from the standard container
2019-02-13 16:21:05 +01:00
Christopher Grebs 45fe5fdffb
Small cleanups 2019-02-08 13:03:11 +01:00
Christopher Grebs d129e2351e
Expose add-on and selected file data.
Fixes #10633
2019-02-08 08:48:32 +01:00
Andrew Williamson c083779f27
correct the api changelog ordering to oldest first (#10486) 2019-01-23 16:00:02 +08:00
Christopher Grebs d305b1b63f
Update reviewers/browse api docs, add missing fields. 2019-01-17 10:55:04 +01:00
Christopher Grebs 300eb84353
Remove GitHub API and unused files.utils helpers (#10412)
Fixes #10411 

This removes unused files.utils helpers `zip_folder_content` and `repack` along the way.

Once this has been merged, ops can remove `GITHUB_API_USER` and `GITHUB_API_TOKEN` from the environment. I actually wonder where they have been generated, e.g to get them revoked?
2019-01-16 12:01:26 +01:00
Christopher Grebs 0b3c03f424
Implement /reviewers/browse/ API. (#10359)
Fixes #10322 

Contains a few very small changes along the way to simplify #9498
2019-01-14 14:57:13 +01:00
Mathieu Pillard 8da7a8d097 Clarify documentation for the discovery API 2019-01-09 15:05:16 +01:00
Andrew Williamson 96d87a9391
drop username editing (#10329) 2019-01-09 19:18:03 +08:00
Mathieu Pillard fbc32f893e Merge remote-tracking branch 'upstream/master' into taar-disco-recommendations-with-override 2019-01-08 17:08:49 +01:00
Andrew Williamson 77110c8e54
Force display_name to have at least one printable charactor (#10324) 2019-01-08 16:40:27 +08:00
Mathieu Pillard 1d805e1846 Add curation override mechanism to discovery endpoint
Also refactors the way we call taar/taar lite since it depends on
a new taar API that needs to be called using POST + a specially
crafted parameter to handle the overrides.
2019-01-04 15:33:13 +01:00
Mathieu Pillard ec7ab24cf2
Merge pull request #10291 from diox/include-more-fields-in-api-search
Add release notes and license info (except full text) to search API
2019-01-03 15:27:23 +01:00
Andrew Williamson 3258a760dc
display_name limited to between 2 and 50 characters (#10270) 2019-01-02 23:14:27 +00:00
Mathieu Pillard 718504bde8 Add release notes and license info (except full text) to search API 2019-01-02 16:56:40 +01:00
Andrew Williamson dd733fe76c
stop using username as a fallback when display name isn't set (#10262) 2019-01-02 10:15:48 +00:00
Mathieu Pillard 4be0ca4973 Decode guid using base64 if prefixed by rta: in search API
This supports the "Return to AMO" feature from bug 1468680.
2018-12-17 14:23:29 +01:00
Mathieu Pillard c7186d0d53 Add search by color in the search API (for static themes only) 2018-12-14 14:53:57 +01:00
ajupazhamayil 72c930b262 issue:7340-remove all the code related to multi-process status except message ids in django.po files (In locale folder) 2018-12-11 18:15:45 +05:30
Christopher Grebs 4a207aeed2
Split selenium based docker-config into tests/ui/docker-compose.selenium.yml (#10143)
Unfortunately, we'll have to duplicate the environment config but I added
a comment so that should be fine. It's very rarely being used anyway.

Fixes #9288
2018-12-03 17:40:00 +01:00
Mathieu Pillard 785df694bb
Merge pull request #10089 from diox/search-ngrams
Implement trigrams search on addon names to help partial matches
2018-11-29 13:31:45 +01:00
Andrew Williamson ed024da8df
publize 128px icon as a standard icon size; only generate 32, 64, 128 (#10092) 2018-11-28 13:08:05 +00:00
Mathieu Pillard 4449bdf978 Implement trigrams search on addon names to help partial matches
Also tweak popularity boost, making it a query-time boost instead,
changing the formula slighly but keeping it relatively similar for
now.
2018-11-27 15:09:05 +01:00
Andrew Williamson 729ce42950
allow ratings api to be filtered by rating score (#9999) 2018-11-20 11:48:42 +00:00
Mathieu Pillard f893e053c0 Add add-on guid to discovery editorial API 2018-11-16 19:27:10 +01:00
Mathieu Pillard 3a51d5cc99 Give some leeway in search fuzzy name matching by using minimum_should_match 2018-11-16 16:18:26 +01:00
Mathieu Pillard f3523b772f Decrease prefix for fuzzy name matching in search, but force all terms to be found 2018-11-16 13:14:21 +01:00
Mathieu Pillard f2f98c7096
Merge pull request #9985 from diox/rescore-to-add-slop-to-match-phrase
Move match_phrase queries against description & summary to a rescore, add slop
2018-11-15 16:03:56 +01:00
Andrew Williamson 2fd365ec53
expose rating flags in detail response when`?include_flags_for=<user>` (#9988) 2018-11-15 13:05:13 +00:00
Mathieu Pillard 9fdae7c68b Move match_phrase queries against description & summary to a rescore, add slop
Adding a slop makes the matching against description & summary more useful,
allowing us to skip words instead of doing a strict match in order. But since
it's potentially costly, we move this to a rescore query and instead do a
regular match for the main query phase.
2018-11-14 11:45:41 +01:00
Andrew Williamson c55c4ec00a
clarify in docs that a rating reply object doesn't have rating, reply or version (#9978) 2018-11-13 13:05:53 +00:00
Andrew Williamson 560c09c996
Add 'is_custom' flag to License object in version detail (#9942) 2018-11-09 17:43:01 +00:00
Mathieu Pillard bd9a154120 Make exact matches against add-on names in search language-aware
This makes us try to do an exact match against both the raw name in the
current language, and the raw name in the default locale for each add-on
(only boosting once, thanks to a dis_max query).

The same kind of logic is also added to description and summary matches.

Extra debugging features (search query naming, API returning
matched_queries information, commented out script to update expected
scores in test_search_ranking.py) are included but shouldn't affect
production (or dev/stage) environments.
2018-11-05 20:17:29 +01:00
William Durand 9f5f2f5d76
Return the version id in the current_version for add-ons returned from the discovery API (#9858)
Fixes #9855
2018-10-31 20:34:30 +01:00
William Durand 5fcdbd7218
Update addons doc to mark the `contributions` field as "string" only (#9846) 2018-10-30 17:22:43 +01:00
William Durand 49add8a7a0
Make the category's description nullable in the doc (#9819)
Fixes #9818
2018-10-26 10:32:06 +02:00
Mathieu Pillard c8f6438b11 Quick update of the elasticsearch docs following recent changes 2018-10-25 14:52:31 +02:00
Christopher Grebs 3f3c788af7 Make clear what the add-on id is in signing api docs. (#9759) 2018-10-22 16:32:07 +01:00
William Durand 40e04de1e3
Expose FxA URL (for editing a user email) in account response (#9758) 2018-10-19 20:34:34 +02:00
Andrew Williamson cca4d40053
support author ids in addon api filter too (#9712) 2018-10-17 10:31:42 +01:00
Andrew Williamson 960ed937aa
delete all the thunderbird things (#9683) 2018-10-15 17:07:08 +01:00
Mathieu Pillard 500bd093a6 Add `show_permissions_for` support, with documentation 2018-10-12 12:46:56 +02:00
Mathieu Pillard 98602ec875 Add can_reply field to ratings list responses when an addon is passed 2018-10-12 12:46:38 +02:00
Mathieu Pillard 7e0ccffc55
Add Elasticsearch score value to the search API results (#9660)
Add Elasticsearch score value to the search API results

Also remove the unused ESAddonSerializerWithUnlistedData.
2018-10-12 12:11:29 +02:00