QQ: Has anyone else observed that sometimes a GitH...
# how-do-i
j
QQ: Has anyone else observed that sometimes a GitHub action (in branch protection rules) does not run when the previous PR in the stack is merged? For instance, I have a github action
Copy code
name: EAS Update Development PR
on:
  pull_request:
    types: [opened, synchronize, reopened]
    branches:
      - develop
That should run, but sometimes when the new branch becomes the bottom of the stack and is pointing at develop (after previous one was merged), then it doesn't seem to update and/or trigger a run of my action. This causes a bit of an annoyance as I then have to push an empty commit to the branch in order to trigger the build? Maybe I'm doing something wrong?
👀 1
p
(If applicable) To help us more clearly understand what you're trying to do, please provide additional details about: - Screenshots / debug logs / list of commands you've tried to run so far - Your workflow - Current state
j
It'll just sit like this:
I will say that sometimes it works perfectly
and it fees like more of a github configuration issue than graphite, but didn't know if anyone here would have any insights as to what that configuration issue could/would be.
p
Hey James, do you have an example Pr you can share the graphite link to? have you tried the rerun button?
j
@bret sorry for the delay - heads just been down working. I have tried clicking that re-run and it doesn't work either. The only thing I can get to run it is an empty commit. It's interesting because obviously the branches in a stack are not pointing at
develop
so I'm assuming Graphite is doing something to attempt to make sure these checks run despite that, right?
All of the branches that I have no I have closed by using the empty commit strategy as I can't just leave them open since this is work and we need to keep moving.
p
so I'm assuming Graphite is doing something to attempt to make sure these checks run despite that
I dont believe so. Here you can see a simple 2 branch stack where the bottom branch has run its CI (GH action targeting main) but the top has not.
Copy code
on:
      push:
        branches: [ "main" ]
      pull_request:
        branches: [ "main" ]
j
@Brett Bedevian but for CI Optimizations, there's an option for "Always run CI on topmost of PR stack". I believe I enabled this (can't see it anymore since we are out of the trial and I'm not an admin anymore), and assumed that this would help things by making sure we knew that top to bottom the stack was mergeable. https://graphite.dev/docs/stacking-and-ci
p
aha, in that case there is an extra layer added to make this work
j
oooh - interesting. I don't remember seeing that in the docs! Do you have a link?
p
its an in app instruction found when you select add new CI optimization
j
ah okay sweet - thanks. I might have to ask my admin for some elevated permissions again.