Skip to content

Commit

Permalink
ci/github: Add workflows:untested label to PRs that change workflows (
Browse files Browse the repository at this point in the history
envoyproxy#37685)

Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Dec 16, 2024
1 parent 54e1f3a commit c8a1b2b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ci/repokitteh/modules/workflows.star
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Flags when a Pull request makes changes to .github/
#
# use("github.com/repokitteh/modules/workflows.star")
#

load("text", "match")

UNTESTED_WORKFLOWS_LABEL = "workflows:untested"


def _check_workflow_changes():
matched = [f for f in github.pr_list_files() if match("^\.github/.*", f['filename'])]
if matched:
github.issue_label(UNTESTED_WORKFLOWS_LABEL)


def _pr(action):
if action in ['synchronize', 'opened']:
_check_workflow_changes()


handlers.pull_request(func=_pr)
1 change: 1 addition & 0 deletions repokitteh.star
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ use(
],
)
use("github.com/envoyproxy/envoy/ci/repokitteh/modules/versionchange.star")
use("github.com/envoyproxy/envoy/ci/repokitteh/modules/workflows.star")

def _backport():
github.issue_label('backport/review')
Expand Down

0 comments on commit c8a1b2b

Please sign in to comment.