Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document and promote webhook usage #1027

Open
pombredanne opened this issue Dec 13, 2023 · 2 comments
Open

Document and promote webhook usage #1027

pombredanne opened this issue Dec 13, 2023 · 2 comments

Comments

@pombredanne
Copy link
Member

A project supports a webhook_url. This feature is not documented, and also not visible in the web UI.

  • It would be great to document the way it is used at least in the API for a start.
  • Later it would be nice to promote this also in the UI
@jayanth-kumar-morem
Copy link
Contributor

I'm working on this

jayanth-kumar-morem added a commit to jayanth-kumar-morem/scancode.io that referenced this issue Dec 18, 2023
- Update InputsBaseForm
- Create post.py file
  - Add test_json_post_accepting_urls func
- Update project_form.html for input box UI
- Update add_inputs_modal.html for input box UI
- Added tests for webhook_urls input box validation

Fixes: aboutcode-org#1027
Signed-off-by: Jayanth Kumar <[email protected]>
@jayanth-kumar-morem
Copy link
Contributor

jayanth-kumar-morem commented Dec 18, 2023

Tasks

jayanth-kumar-morem added a commit to jayanth-kumar-morem/scancode.io that referenced this issue Dec 19, 2023
- Create a new form obj `WebhookSubscriptionArea`
- Include `WebhookSubscriptionArea` in `ProjectSettingsForm`
- Initial value is "\n" separated list of URLs retrieved using `project.websubscriptions.all()`
- While submitting form
  - Check if `websubscriptions` input already is not `None` or `""`
  - Delete all existing `WebhookSubscription` objects for the project
  - Create new `WebhookSubscription` objects for each URL in the input
  - Delete `webhooksubscriptions` key from `config` dict to avoid saving it in `settings` model

Fixes: aboutcode-org#1027
Signed-off-by: Jayanth Kumar <[email protected]>
jayanth-kumar-morem added a commit to jayanth-kumar-morem/scancode.io that referenced this issue Dec 19, 2023
- Create a new form obj `WebhookSubscriptionArea`
- Include `WebhookSubscriptionArea` in `ProjectSettingsForm`
- Initial value is "\n" separated list of URLs retrieved using `project.websubscriptions.all()`
- While submitting form
  - Check if `websubscriptions` input already is not `None` or `""`
  - Delete all existing `WebhookSubscription` objects for the project
  - Create new `WebhookSubscription` objects for each URL in the input
  - Delete `webhooksubscriptions` key from `config` dict to avoid saving it in `settings` model

Fixes: aboutcode-org#1027
Signed-off-by: Jayanth Kumar <[email protected]>
tdruez added a commit that referenced this issue May 8, 2024
tdruez added a commit that referenced this issue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants