Skip to content
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

Raise an error when trying to push to a protected branch without sufficient permissions #88

Open
anna-geller opened this issue Aug 15, 2024 · 0 comments
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working kind/customer-request Requested by one or more customers

Comments

@anna-geller
Copy link
Member

Issue description

Issue reported via Slack:

"We use GitLab and wanted to sync flows to it.
Long story short, the default branch we use is protected and allows only maintainers to push.
I created an Access Token with developer access and tried to run the Push Flow task. it was going through good, no errors. But nothing appeared in git.
I figured it was an issue with permissions to push to the branch.
It would be great if the PushFlows task would drop an error instead of finishing it successfully.
flow code i used:"

id: push_to_git
namespace: system
 
tasks:
  - id: commit_and_push
    type: io.kestra.plugin.git.PushFlows
    sourceNamespace: xxxxx.dev # the namespace from which flows are pushed
    targetNamespace: xxxxx.dev # the target production namespace; if different than sourceNamespace, the sourceNamespace in the source code will be overwritten by the targetNamespace
    flows: "*"  # optional list of glob patterns; by default, all flows are pushed
    includeChildNamespaces: true # optional boolean, false by default
    gitDirectory: _flows
    url: https://gitlab.com/xxxxx/xxxxx/kestra-flows # required string
    username: "{{ namespace.git_username }}" # required string needed for Auth with Git
    password: "{{ namespace.git_password }}"
    branch: develop # optional, uses "kestra" by default
    commitMessage: "add flows {{ now() }}" 
@anna-geller anna-geller added the bug Something isn't working label Aug 15, 2024
@kestrabot kestrabot bot added this to Issues Aug 15, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Aug 15, 2024
@paulgrainger85 paulgrainger85 added the kind/customer-request Requested by one or more customers label Aug 15, 2024
@Ben8t Ben8t added the area/plugin Plugin-related issue or feature request label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working kind/customer-request Requested by one or more customers
Projects
Status: Backlog
Development

No branches or pull requests

3 participants