Skip to content

Commit

Permalink
repokitteh: Label version change PRs (#25853)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Mar 2, 2023
1 parent b347c90 commit 8bf39ab
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ci/repokitteh/modules/versionchange.star
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Flags when a Pull request makes changes to VERSION.txt
#
# use("github.com/repokitteh/modules/versionchange.star")
#

load("text", "match")

# TODO(phlax): put this in config
VERSION_CHANGE_LABEL = "version-change"


def _check_version_changes():
matched = [f for f in github.pr_list_files() if match("VERSION.txt", f['filename'])]
if matched:
github.issue_label(VERSION_CHANGE_LABEL)


def _pr(action):
if action in ['synchronize', 'opened']:
_check_version_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 @@ -50,6 +50,7 @@ use(
},
],
)
use("github.com/envoyproxy/envoy/ci/repokitteh/modules/versionchange.star")

alias('retest', 'retry-azp')

Expand Down

0 comments on commit 8bf39ab

Please sign in to comment.