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

Not working for github PRs #38

Closed
prma85 opened this issue May 6, 2020 · 7 comments
Closed

Not working for github PRs #38

prma85 opened this issue May 6, 2020 · 7 comments

Comments

@prma85
Copy link

prma85 commented May 6, 2020

Hey, I like the idea of this task, but it is not working for me

steps:
- task: ShaykiAbramczyk.CreatePullRequest.CreatePullRequest.CreatePullRequest@1
  displayName: 'Create Pull Request'
  inputs:
    repoType: GitHub
    githubEndpoint: 'GitHub-iQmetrixService'
    sourceBranch: 'automated-update-storybook'
    targetBranch: master
    title: '[Azure Pipelines] Automated Update for Storybook'
    description: 'Minor version bump'

When using it, I am getting the error:
You cannot call a method on a null-valued expression.

@shayki5
Copy link
Owner

shayki5 commented May 6, 2020

Hi @prma85!
Thank you for reporting that!
Could you run the pipeline with the variable system.debug = true and share here the logs?
And, could you try to put the master in quotes - 'master'?

@prma85
Copy link
Author

prma85 commented May 6, 2020

This is the YAML generated from using the task in the Release pipeline
I didn't have the quotes for any of the branches, but now that you mentioned it, it is weird that the the targetBranch is the only one not putting the quotes automatically when clicking in the view YAML

I will try this out 👍

@shayki5
Copy link
Owner

shayki5 commented May 7, 2020

@prma85 oh it's from a release pipeline? I think this is the reason, Azure DevOps not know which GitHub repo you want to create the PR.
I will check if I can fix it (for Azure Repos it works also from releases).
Anyway, I would love to get the logs.
Thank you!

shayki5 added a commit that referenced this issue May 13, 2020
* add github repo selector

* add endpointid to github in task.json

* fix endpoint id

* fix task json

* update readme

Co-authored-by: Shayki Abramczyk
@shayki5
Copy link
Owner

shayki5 commented May 13, 2020

Hi @prma85,
I fixed it :)
I uploaded a new version, now you can choose your GitHub repo and it should work :)
Please check and update.

Kind regards,
Shayki

@prma85
Copy link
Author

prma85 commented May 13, 2020

Nice, thanks for doing it

I wasn't able to test it yet because the team was dropped the automated PR project and we trying to use dependable for what we need (internal packages)

But out use case was creating a new Branch, doing changes and pushing it in the release pipeline
So, in the end, we would be creating the PR from the pipeline

So, it wouldn't be the case of selecting the branch as it wouldn't exist yet when running the release pipeline 🤔

@shayki5
Copy link
Owner

shayki5 commented May 14, 2020

Thanks for your response!
I not added branch selecting, I added repo selecting.
I will keep this issue open for a while, I wish you could test it :)

@shayki5
Copy link
Owner

shayki5 commented May 24, 2020

Close it for now.
If someone still facing an error please update :)

@shayki5 shayki5 closed this as completed May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants