kestra-io / plugin-git

Apache License 2.0
3 stars 2 forks source link

Remove deprecation on git Push task and change its documentation #84

Closed anna-geller closed 3 days ago

anna-geller commented 2 months ago

Feature description

We can keep this task, but we should adjust the implementation and documentation to clarify that it's intended to push arbitrary files to Git (not intended to push flows or namespace files but rather arbitrary code).

Example user workflow that autogenerates code and pushes it to Git:

id: dbt
namespace: company.myteam
tasks:
  - id: wdir
    type: io.kestra.plugin.core.flow.WorkingDirectory
    tasks:
      - id: clone
        type: io.kestra.plugin.git.Clone
        branch: main
        url: https://github.com/kestra-io/scripts
      - id: generate_data
        type: io.kestra.plugin.scripts.python.Commands
        docker:
          image: ghcr.io/kestra-io/pydata:latest
        commands:
          - python generate_data/generate_orders.py
      - id: push
        type: io.kestra.plugin.git.Push
        username: git_username
        password: myPAT
        branch: feature_branch
        inputFiles:
          to_commit/avg_order.txt: "{{ outputs.generate_data.vars.average_order }}"
        addFilesPattern:
          - to_commit
        commitMessage: "{{ inputs.commit_message }}"

https://kestra-io.slack.com/archives/C03FQKXRK3K/p1718525625224609