[openSUSE/open-build-service] 29b470: Call SCMStatusReporter and not specific reporters
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 29b4705e35ad24e6c5cb9bfbb0120477b184ff32 https://github.com/openSUSE/open-build-service/commit/29b4705e35ad24e6c5cb9b... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2022-07-15 (Fri, 15 Jul 2022) Changed paths: M src/api/app/jobs/report_to_scm_job.rb Log Message: ----------- Call SCMStatusReporter and not specific reporters In the ReportToScmJob we simply call SCMStatusReporter, which is in charge of deciding whether it has to call GitlabStatusReporter or GitlabStatusReporter. Co-authored-by: Dany Marcoux <dmarcoux@suse.com> Co-authored-by: Rubhan Azeem <rubhan.azeem@suse.com> Commit: e1a1524264a5962925766af0e70b738348512c1f https://github.com/openSUSE/open-build-service/commit/e1a1524264a5962925766a... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2022-07-15 (Fri, 15 Jul 2022) Changed paths: M src/api/app/models/token/workflow.rb R src/api/app/services/scm_initial_status_reporter.rb Log Message: ----------- Remove ScmInitialStatusReporter ScmInitialStatusReporter and ScmStatusReporter did exactly the same, except for the state value and the status_options (context and target_url) we send to the SCM. We remove ScmInitialStatusReporter and use ScmStatusReporter also for the inital report. In that case we pass the key argument `initial_report` to its initializer. Co-authored-by: Dany Marcoux <dmarcoux@suse.com> Co-authored-by: Rubhan Azeem <rubhan.azeem@suse.com> Commit: fd76b4e8493d79a69b7906eb7705bd9c542a6b8d https://github.com/openSUSE/open-build-service/commit/fd76b4e8493d79a69b7906... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2022-07-15 (Fri, 15 Jul 2022) Changed paths: M src/api/app/services/github_status_reporter.rb M src/api/app/services/gitlab_status_reporter.rb M src/api/app/services/scm_status_reporter.rb Log Message: ----------- Refactor the reporters' code - GithubStatusReporter and GitlabStatusReporter no longer inherit from SCMStatusReporter. - SCMStatusReporter will be the entry point, who decides whether we call GithubStatusReporter or GitlabStatusReporter. - We adapt the parameters we pass to the initializers, including `initial_report`. The code of GithubStatusReporter and GitlabStatusReporter can be refactored by adding a parent class. Co-authored-by: Dany Marcoux <dmarcoux@suse.com> Co-authored-by: Rubhan Azeem <rubhan.azeem@suse.com> Commit: 806d822098b59d44e89af7cb9b10fadbda7eae78 https://github.com/openSUSE/open-build-service/commit/806d822098b59d44e89af7... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2022-07-15 (Fri, 15 Jul 2022) Changed paths: M src/api/spec/models/token/workflow_spec.rb M src/api/spec/services/github_status_reporter_spec.rb M src/api/spec/services/gitlab_status_reporter_spec.rb Log Message: ----------- Adapt the specs related to the reporters Co-authored-by: Rubhan Azeem <rubhan.azeem@suse.com> Commit: 8ad735620213c377e2ddd0c6371a185200d4df32 https://github.com/openSUSE/open-build-service/commit/8ad735620213c377e2ddd0... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2022-07-15 (Fri, 15 Jul 2022) Changed paths: M src/api/app/jobs/report_to_scm_job.rb M src/api/app/models/token/workflow.rb M src/api/app/services/github_status_reporter.rb M src/api/app/services/gitlab_status_reporter.rb R src/api/app/services/scm_initial_status_reporter.rb M src/api/app/services/scm_status_reporter.rb M src/api/spec/models/token/workflow_spec.rb M src/api/spec/services/github_status_reporter_spec.rb M src/api/spec/services/gitlab_status_reporter_spec.rb Log Message: ----------- Merge pull request #12809 from saraycp/fix_initial_status_report Fix initial status report and refactor the reporters' code Compare: https://github.com/openSUSE/open-build-service/compare/01c80f286348...8ad735...
participants (1)
-
Henne Vogelsang