This refactors the webhook API in D8798, using classes instead of simple functions
This removes most of the boilerplate
Differential D8800
save_origin_webhooks, class edition vlorentz on Nov 2 2022, 10:23 AM. Authored by Tags None Subscribers None
Details
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D8800 (id=31711)Rebasing onto 024da72220... Current branch diff-target is up to date. Changes applied before testcommit ae5f6a44cb83e93be5deb5767c9702baddde2da4 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Nov 2 10:22:24 2022 +0100 Refactor webhook API using classes instead of simple functions This removes most of the boilerplate commit ad5ce708c1d00251bf99f78b5a556b79ae519cc9 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Wed Nov 2 09:44:06 2022 +0100 save_origin_webhooks: Add push webhook receivers for popular forges Summary: Add new Web API endpoints accepting only POST requests coming from push webhooks of the following popular forges or their instances: - Bitbucket - Gitea - GitHub - GitLab - SourceForge There is one API endpoint per forge type enabling to request or update the archival of a repository when new commits are pushed to it through the Save Code Now service. Each endpoint simply processes the webhook JSON payload sent by a forge in order to extract the repository URL and the visit type in order to create a new save request for the repository. Related to T4548 Reviewers: #reviewers Maniphest Tasks: T4548 Differential Revision: https://forge.softwareheritage.org/D8798 See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2100/ for more details. Comment Actions Build has FAILED Patch application report for D8800 (id=31712)Rebasing onto 024da72220... Current branch diff-target is up to date. Changes applied before testcommit 933f546249ad3fd4f1d6e624c1d841eba1d3a835 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Nov 2 10:24:31 2022 +0100 remove unused set_docstring commit ae5f6a44cb83e93be5deb5767c9702baddde2da4 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Nov 2 10:22:24 2022 +0100 Refactor webhook API using classes instead of simple functions This removes most of the boilerplate commit ad5ce708c1d00251bf99f78b5a556b79ae519cc9 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Wed Nov 2 09:44:06 2022 +0100 save_origin_webhooks: Add push webhook receivers for popular forges Summary: Add new Web API endpoints accepting only POST requests coming from push webhooks of the following popular forges or their instances: - Bitbucket - Gitea - GitHub - GitLab - SourceForge There is one API endpoint per forge type enabling to request or update the archival of a repository when new commits are pushed to it through the Save Code Now service. Each endpoint simply processes the webhook JSON payload sent by a forge in order to extract the repository URL and the visit type in order to create a new save request for the repository. Related to T4548 Reviewers: #reviewers Maniphest Tasks: T4548 Differential Revision: https://forge.softwareheritage.org/D8798 Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2101/ |