Skip to content

Allow users to import workflows from base templates #3136

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

Merged
merged 12 commits into from
Apr 18, 2025

Conversation

midigofrank
Copy link
Collaborator

Description

This PR defines 2 templates which the user can choose from when creating a workflow, one for webhook trigger and another for cron trigger.
The default trigger workflow that was getting rendered initially when you create a workflow is what has been saved as base webhook template.

Closes #3110

Validation steps

  1. Click to create a workflow.
  2. Pick between the base-webhook and base-cron trigger
  3. When you describe your workflow in the search input, that is what is used as the workflow name. If you don't put in the name, the workflow name will be picked as Copy of {template name}

Additional notes for the reviewer

I have removed the default workflow from the js land that was used to load the editor. This is because currently liveview provides the templates, including the default one.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@github-project-automation github-project-automation bot moved this to New Issues in v2 Apr 18, 2025
@midigofrank midigofrank self-assigned this Apr 18, 2025
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.54%. Comparing base (46827eb) to head (b3a373c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3136      +/-   ##
==========================================
+ Coverage   91.52%   91.54%   +0.02%     
==========================================
  Files         357      357              
  Lines       13399    13446      +47     
==========================================
+ Hits        12263    12309      +46     
- Misses       1136     1137       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@midigofrank midigofrank marked this pull request as ready for review April 18, 2025 11:29
Copy link
Member

@taylordowns2000 taylordowns2000 left a comment

Choose a reason for hiding this comment

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

looks great. i've restyled slightly and added drag & drop functionality plus some tests. thanks, frank!

Copy link
Contributor

@elias-ba elias-ba left a comment

Choose a reason for hiding this comment

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

@midigofrank @taylordowns2000 this is looking good to me, nice job 👏🏽

@taylordowns2000 taylordowns2000 merged commit 43363a7 into main Apr 18, 2025
8 checks passed
@taylordowns2000 taylordowns2000 deleted the 3110-import-workflows-from-base-templates branch April 18, 2025 14:25
@github-project-automation github-project-automation bot moved this from New Issues to Done in v2 Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Load the default new workflow as a template
3 participants