[openSUSE/open-build-service] d1a953: Stop passing request to the Token::Workflow#call
Branch: refs/heads/workflow_token Home: https://github.com/openSUSE/open-build-service Commit: d1a953f8eefc8d865fd284d2096fd5d5954c86a2 https://github.com/openSUSE/open-build-service/commit/d1a953f8eefc8d865fd284... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2021-05-05 (Wed, 05 May 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb Log Message: ----------- Stop passing request to the Token::Workflow#call In the current version of the code we decided not to pass the whole HTTP request to the model but only the needed values: scm, event and payload. As we split the code, we are going to pass the those parameters from TriggerWorkflowController, not from TriggerController. Commit: c8b5379233a69a4a62b2548810706b731780a229 https://github.com/openSUSE/open-build-service/commit/c8b5379233a69a4a62b254... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2021-05-05 (Wed, 05 May 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb Log Message: ----------- Skip validate_params for both GitHub and GitLab After more detailed tests, it is clear that the `validate_params` can fail in both GitHub and GitLab webhooks. Each of them can send a non-string value as parameters. For example, GitHub sends an integer value for "number" key (PR number) and GitLab sends a hash representing the project, the user, etc. Commit: cc801d35b9850d5f0f2c6e635be77ac5acc72c2f https://github.com/openSUSE/open-build-service/commit/cc801d35b9850d5f0f2c6e... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2021-05-05 (Wed, 05 May 2021) Changed paths: M src/api/app/models/token/workflow.rb Log Message: ----------- Comment line that is still unused and causes linter complains Commit: fd7135e47557a7b6d4bf6656788b030a95933d96 https://github.com/openSUSE/open-build-service/commit/fd7135e47557a7b6d4bf66... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2021-05-05 (Wed, 05 May 2021) Changed paths: M src/api/app/services/trigger_controller_service/scm_extractor.rb Log Message: ----------- Simplify call method to not exceed 25 lines Detected by Code Climate. Commit: c8443152dafa47533e106664bce1fb8925a63f44 https://github.com/openSUSE/open-build-service/commit/c8443152dafa47533e1066... Author: Dani Donisa <daniel.donisa@suse.com> Date: 2021-05-05 (Wed, 05 May 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token/workflow.rb M src/api/app/services/trigger_controller_service/scm_extractor.rb Log Message: ----------- Merge pull request #11077 from saraycp/little_fixes_II Add some fixes and improvements Compare: https://github.com/openSUSE/open-build-service/compare/fa222adcd0c2...c84431...
participants (1)
-
Dani Donisa