Closed oliverabclabs closed 2 years ago
Hi @oliverabclabs
This action can create pull requests in remote repositories without you needing to commit to the remote repository first.
# Checkout the remote repo with a `repo` scoped PAT
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
repository: owner/repo
ref: dev
# Make changes to pull request here
- uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PAT }}
branch: branch-111
To make the changes what I would recommend is to create an artifact of dist/dto-type-declarations.ts
using upload-artifact. You can do this in a prerequisite job to the job where you create the pull request. Then in the second job where you create the pull request, use download-artifact to place the file exactly where you want it in the remote repo file structure.
Don't need to even do that, if on windows one can use robocopy to copy the file into the destination folder in the other repository, or if on any other OS than windows you can copy it using cp
. The cp
option could work for windows as well though.
Hi @oliverabclabs
This action can create pull requests in remote repositories without you needing to commit to the remote repository first.
# Checkout the remote repo with a `repo` scoped PAT - uses: actions/checkout@v2 with: token: ${{ secrets.PAT }} repository: owner/repo ref: dev # Make changes to pull request here - uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.PAT }} branch: branch-111
To make the changes what I would recommend is to create an artifact of
dist/dto-type-declarations.ts
using upload-artifact. You can do this in a prerequisite job to the job where you create the pull request. Then in the second job where you create the pull request, use download-artifact to place the file exactly where you want it in the remote repo file structure.
@peter-evans what if the repo is a public one, we we skip the PAT then?
@AraHaan No, you still need a PAT for public repos in the scenario I described, but I think you can use the public_repo
scope instead of repo
.
Branch 'branch-111' no longer differs from base branch 'dev'
Any ideas on why this is happening? I'm facing the exact same issue.
To make the changes what I would recommend is to create an artifact of
dist/dto-type-declarations.ts
using upload-artifact. You can do this in a prerequisite job to the job where you create the pull request. Then in the second job where you create the pull request, use download-artifact to place the file exactly where you want it in the remote repo file structure.
I can bypass this with msbuild's Copy
and Delete
tasks so that way older unneeded files get deleted where only the newest versions get copied. For my cases I needed this to copy msi/exe windows installers, macos installation bundles (*.pkg), and even linux bundles as well (tar.gz of the files that would have made it into an installer) (where it will commit them to that repository).
Hi @lucashimizu
Branch 'branch-111' no longer differs from base branch 'dev'
Any ideas on why this is happening? I'm facing the exact same issue.
This is not an "issue," it's part of the normal operation of the action. If it's not what you expect to happen then it's likely that you need to make some changes to your workflow and/or the way you are using the action for the use case you have. If you need some help then please make a new issue describing your use case and showing the workflow you have tried.
I'll close this issue for now because it's getting a bit off-topic.
Subject of the issue
From my backend repo I push changes to the frontend repo using another action. This works fine. But I cannot seem to create a PR using this action from that branch. I assume this is because the changes are not local, they only exist remotely in the feature branch-111. Shouldnt it be possible to create a PR then?
I get:
Branch 'branch-111' no longer differs from base branch 'dev'
In short: I want to create a PR in a remote repository from a branch 'branch-111' to dev and they already differ.
Steps to reproduce
I have the following workflow snippet in backend repo (code is obfuscated for privacy reasons)
Any help is very much appreciated!