vsoch / pull-request-action

open a pull request when a branch is pushed or updated
https://github.com/marketplace/actions/pull-request-action
MIT License
174 stars 62 forks source link

Create a PR from a branch that was just merged to master #31

Closed Trancever closed 4 years ago

Trancever commented 4 years ago

Hey. Is it possible to use this action to open a PR from a branch "A" to branch "B" when branch "A" is merged to master?

That's what I have right now:

name: Pull Request on Branch Push
on:
  push:
    branches:
      - gh-action-test
jobs:
  auto-pull-request:
    name: PullRequestAction
    runs-on: ubuntu-latest
    steps:
      - name: pull-request-action
        uses: vsoch/pull-request-action@1.0.5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH_PREFIX: ""
          PULL_REQUEST_BRANCH: "4.0"

It opens a PR from "gh-action-test" to "4.0" whenever something is merged to "gh-action-test". I want it to open a PR from "B" to "4.0" whenever "B" is merged to "gh-action-test". Unfortunately, I have no idea how could I implement it.

vsoch commented 4 years ago

If you want a GitHub Action to trigger another action, this isn’t allowed per GitHub rules.

If you want a different (separate) workflow, just make another similar file that is for B and GitHub-branch-test.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.