spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
376 stars 33 forks source link

Tips on how to run github workflow checks for stacked diffs? #161

Closed opqpop closed 1 year ago

opqpop commented 1 year ago

We have a github workflow like this, which runs fine on my 1st diff, but when i have stacked diffs, the 2nd and 3rd ones don't run

I'm not entirely sure why, any thoughts on best way for them to run on all diffs?

Is it because I have branches: ["main"]?

.github/workflows/project.yml file

name: Project

on:
  pull_request:
    branches: ["main"]
    paths:
      - "src/project/**"
      - ".github/workflows/project.yml"
  push:
    branches: ["main"]
    paths:
      - "src/project/**"
      - ".github/workflows/project.yml"

jobs:
  verify-frontend:
spacedentist commented 1 year ago

Yes. The 2nd, 3rd, and-so-on PRs are not against your "main" branch. The base branch (i.e. the branch to merge into) is only set to main just before you land the diff. If your workflows specifically only run for PRs targeting main, they won't run. This is not a choice made by spr - it's the only way to stack PRs on GitHub.