Closed billsioros closed 3 years ago
Hi @billsioros
It looks like you are using the action correctly, but there are no changes to raise in the pull request. I think the problem is in the Invoke cookiecutter
step before. I don't think you need the cd ../
. At the start of each step you are already at the root of the repository. It looks like you are creating the files in the wrong path.
- name: Invoke cookiecutter
run: |
- cd ../
cookiecutter https://github.com/${GITHUB_REPOSITORY} --overwrite-if-exists --no-input project_name=cookiecutter-pypackage-instance
cd cookiecutter-pypackage-instance
I might be misunderstanding what you are trying to do, but I'm fairly sure the problem is in the step(s) before you are executing the create-pull-request
action.
Hi @peter-evans,
Thanks for the advice. I was able to create a pull request following your advice but not with the desired outcome π’. As you can see from this closed pull request, as well as the source code on the master
branch, a folder is created containing all the changes. The additional cd ../
was there in order to avoid this exact behavior. My intention is for all changes to be made on the cwd
and not a subdir.
Any ideas π ?
Edit: I was able to manually move the resulting files outside the subdir like so
...
- name: Invoke cookiecutter
run: |
cookiecutter https://github.com/${GITHUB_REPOSITORY} --overwrite-if-exists --no-input project_name=cookiecutter-pypackage-instance
mv -f cookiecutter-pypackage-instance/* .
...
but the resulting pull request does not contain the .github
folder
If you look at the cookiecutter docs here it says you can use the flag --output-dir
to specify the output directory.
Try this:
- name: Invoke cookiecutter
run: |
cookiecutter https://github.com/${GITHUB_REPOSITORY} --output-dir="${GITHUB_WORKSPACE}" --overwrite-if-exists --no-input project_name=cookiecutter-pypackage-instance
If you look at the cookiecutter docs here it says you can use the flag
--output-dir
to specify the output directory.Try this:
- name: Invoke cookiecutter run: | cookiecutter https://github.com/${GITHUB_REPOSITORY} --output-dir="${GITHUB_WORKSPACE}" --overwrite-if-exists --no-input project_name=cookiecutter-pypackage-instance
Thanks very much for your input! I managed to find a workaround by simply moving the hidden files, as well as the normal files, outside the resulting subdir. Mistake on my part π Feel free to close the issue.
No problem. Glad you've figured out a solution π
Subject of the issue
I am unable to create a pull request to a different repository. It looks like it might relate to #902 & #792, but I'm not quite sure.
Steps to reproduce
The workflow can be found here, whilst a run of the specific workflow can be found here
I am also providing the workflow logs