kestra-io / plugin-git

Apache License 2.0
3 stars 4 forks source link

Allow flows to be pushed to Git using the `git.Push` task #24

Closed Ben8t closed 10 months ago

Ben8t commented 11 months ago

The new git.Push task is very nice to push scripts written in the Editor. However we can't push Flows (stored in the _flow directory). Hence users can't push their flow modification alongside their scripts.

-> add the possibility to push Flows with the git.Push task

Proposed syntax

  - id: commit_and_push
    type: io.kestra.plugin.git.Push
    flows: 
      enabled: true # default true
      childNamespaces: true # default true
      gitDirectory: _flows # default _flows - same as in the Editor
    namespaceFiles:
      enabled: true
    url: https://github.com/kestra-io/scripts
    branch: flows 
    username: anna-geller
    password: "{{ secret('GITHUB_PAT') }}"
    commitMessage: add flows
anna-geller commented 11 months ago

Thanks for adding this. did you talk to @brian-mulier-p? I agree this would be a nice addition

If I remember correctly, there were some technical challenges in getting access to all the flows from a task

brian-mulier-p commented 11 months ago

We didn't add it because we thought of adding a dedicated fetch flows task that would give out such infos so idk

anna-geller commented 11 months ago

Good idea Brian, let's talk next week how we can create that fetch flows task and integrate with git.Push. We can keep this issue open until then 👍