Skip to content

GitHub HTTP post failing #11233

Closed Locked Answered by RitudhwajA
RitudhwajA asked this question in Q&A
Discussion options

You must be logged in to vote

So silly of me to make this mistake.

As per the official github documentation the ref in the request body should be like this "ref":"refs/heads/".

Github api create reference

Here is the updated template

kind: Workflow
metadata:
  generateName: expand-pvc-template-
spec:
  entrypoint: main
  serviceAccountName: argo-workflow-sa
  arguments:
    parameters:
      - name: uri
        value: "<github-uri>"
  templates:
    - name: main
      steps:
        - - name: create-branch-github
            template: github-http-post-put
            arguments:
              parameters:
                - name: url
                  value: "{{workflow.parameters.uri}}/git/refs"
                - name: m…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RitudhwajA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area/templates/http type/support User support issue - likely not a bug
1 participant