-
Notifications
You must be signed in to change notification settings - Fork 2
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
Welcome responder with "if" conditional on issue template #23
Comments
@xuanxu A gentle ping on this issue. The external service is all up and running, and can be used to check template variables independent of here, so the welcome responder can call straight to that service 🚀 ... but one question before that: It would still be good to have a welcome responder when full review issues are opened, but not when pre-submission enquiries or others are opened. So we still need some kind of welcome:
data_from_issue: submission-type
if: submission-type == "Standard|Estándar|Stats"
message: "Thanks for submitting!"
external_service:
url: <endpoint-URL>
method: get
data_from_issue:
- repourl
- repo
- issue_id
template_file: template.md That |
Whatever conditions are set (with the welcome:
if:
value_matches:
submission-type: "Standard|Estándar|Stats"
external_service:
url: ...
method: ...
template: ...
... |
Awesome! This will also then only run on welcome:
if:
value_matches:
submission-type: "Standard|Estándar|Stats"
message: "Message only if right submission type"
external_service:
url: ...
method: ...
template: ...
... |
Exactly! |
@xuanxu This issue is pretty much ready to close, but one question in the meantime. We current have a welcome responder that looks like this: buffy/config/settings-production.yml Lines 18 to 31 in 957fdc4
I've been trying to test it in another repo, but it does not respond. What looks like a response was generated by my giving an external nudge to the external service, but the service is not queries at all by the welcome responder as configured. (Here is a clean example showing failure to respond, and no call was made to our external service.) Is the responder as specified above hard-coded for |
@mpadge It looks like the config for the external_service is missing a mandatory param: |
add name parameter to external service for #23
Merged! |
@maelle Will the Heroku server be automatically updated to match this change, or does something else have to be done? |
@xuanxu Now we get this response, and again here, clearly from here: buffy/app/workers/external_service_worker.rb Lines 36 to 38 in f83771b
The 500 was also logged at our external service (which is good!), so we now have the service itself working: buffy/config/settings-production.yml Lines 97 to 111 in f83771b
... yet not when part of the welcome responder: buffy/config/settings-production.yml Lines 23 to 32 in f83771b
Still need a bit more help debugging this, please! |
🤔 If the service is called in both cases, maybe there's some diference in the query or params sent? Can you check that in the external service server? BTW as it's configured now, both |
Yeah, it must be some difference in the query or params, but I can't intercept the parameters in the external service, unfortunately. Heroku also doesn't provide any insight into the queries that are actually constructed. Any other ideas? |
Maybe taking a look at the payloads for a 'issue open' vs a 'comment' in the latest deliveries of the webhook and check in both cases the info is correct (issue:body includes repourl, etc) is worth a try. |
The webhook bodies are identical, so it's not that. |
I rebuilt the logger and redeployed the service so we get more insight, including the full query string (after
while the welcome responder only does this:
The query string for welcome responder isn't properly formed - it is only this (re-formatted for easy reading):
but it should be this
The all-important |
@xuanxu after your
so still missing the critical |
I had a bit of a buffy/app/responders/welcome_responder.rb Lines 25 to 36 in 1736e4d
|
This can now also be closed. Thank you @xuanxu for all your great work here - addressing all the things in this issue is a key part of the whole automation process. Great work!! |
@xuanxu Our external check service is now up and running, and we would like to plug it in to the welcome responder, which is now very easy thanks to your previous work 🚀 👍 The only thing I do not (yet) know how to do is to only call the service if the issue is opened with particular templates? All templates have different names, and also variables that are either present or absent, plus one for
submission-type
that differs between the templates. We just need to work out:if
logic to awelcome
responder? (Maybe that's already possible?)Thanks!
The text was updated successfully, but these errors were encountered: