Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I found the original code confusing because it _always_ checks if the PR is approved, even when run on forks. Yet the job still bails if run on a fork, _even if the PR is approved_. So I pulled the `if` conditional that bypasses forks up into the first job. If that results in skipping the `approval` job, then the subsequent job that `needs: approval` will also be skipped ([docs](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds)). So this should hopefully be both more readable within the code, more readable on PR's, and also more performant. 🥂 Originally, I wasn't 100% sure this would work... perhaps there was a reason why the fork-check conditional needed to be attached to the second job. However, when I checked `git blame` I see that originally this was a single job, and then split in two: * #8651 And looking at the commit history on that PR, I think these two commits indicate the author was focused on simplifying two steps into one, so didn't consider the possibility of skipping earlier: * ede644b * c7069e6
- Loading branch information