Skip to content
New issue

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

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

Already on GitHub? # to your account

toolmsg webhook plugin on dev + prod #2212

Merged
merged 5 commits into from
Oct 13, 2024

Conversation

neoformit
Copy link
Collaborator

@neoformit neoformit commented Oct 2, 2024

I wrote a webhook plugin that allows us to define tool-specific messages.

Just deployed on dev last night.

This config in dev.gvl.org.au.yml:

# N.B. make tool_id as short as possible to match all versions
# A trailing slash can result in a mismatch, depending on how the user navigates to the tool form!
toolmsg_messages:
  - tool_id: toolshed.g2.bx.psu.edu/repos/iuc/abyss/abyss-pe
    message: A custom message for ABySS!
    class: danger

Results in:

image

The toolmsg_messages schema:

  - tool_id: message will display if current_tool_id.startsWith(tool_id)
    message: A custom message to be displayed for this tool (text only, no HTML currently)
    class: bootstrap class - must be one of [primary, info, success, warning, danger]

@neoformit neoformit requested a review from cat-bro October 2, 2024 22:55
cat-bro
cat-bro previously approved these changes Oct 3, 2024
@neoformit neoformit changed the title toolmsg webhook plugin on dev toolmsg webhook plugin on dev + prod Oct 7, 2024
@neoformit
Copy link
Collaborator Author

Please note @cat-bro I pushed another commit to this for prod deployment requested by Gareth.

@cat-bro
Copy link
Collaborator

cat-bro commented Oct 11, 2024

This looks great! Could you please alter the console.log statements so that they are always prepended by something like [toolmsg-webhook] or toolmsg webhook: so that it is easy to identify where they are coming from in the console?

@neoformit
Copy link
Collaborator Author

Good point @cat-bro - I did one better and made the console logs toggle on/off (default off). They are only useful for debugging.

Copy link
Collaborator

@cat-bro cat-bro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cat-bro cat-bro merged commit 8538de9 into usegalaxy-au:master Oct 13, 2024
@bgruening
Copy link
Contributor

THIS IS AWESOME!!!!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants