Skip to content

Commit

Permalink
Add required labels for all PRs (#2885)
Browse files Browse the repository at this point in the history
## What is the purpose of the change

Subcomponent of #2088

This PR is pretty overdue, but is a first step in getting our PR management / backporting flow be far easier to manage. 

It requires all PRs to main to have a label indicating if its state machine compatible or breaking. We can then start making more automated security checks and backport tooling for these. This is done by using https://github.com/mheap/github-action-required-labels

The check re-runs after a label is applied!

E.g. 
* if backport
  * and merge conflicts, a bot opens a draft backport PRs that are kept in sync and we can conflicts on. 
  * If no conflicts, CI can show in PR status checks whether state machine compat passes. This can be used to guarantee state machine compatability guarantee pre-merge to main, and have the merge automatically cause a commit to the relevant release branch. 
* If SM compat, Simulator runs to check state machine compatible, etc.

## Testing and Verifying

This PR status check failed until I added the label.

## Documentation and Release Note

We likely need to add:
* Some docs to contributing.md 
* Perhaps a PR template update
* Perhaps a more informed error message
  • Loading branch information
ValarDragon authored Sep 29, 2022
1 parent b91f794 commit c4a5ff5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/required_labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: required labels

on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
branches:
- 'main'
jobs:
state_compatability_labels:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v2
env:
GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
with: #Require one of the following labels
mode: exactly
count: 1
labels: "V:state/breaking, V:state/compatible/no_backport, V:state/compatible/backport"

0 comments on commit c4a5ff5

Please sign in to comment.