Skip to content
This repository was archived by the owner on Jun 25, 2026. It is now read-only.

Commit d35e8ee

Browse files
committed
feat(runner): label rascal-created pull requests
1 parent 68b667f commit d35e8ee

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

cmd/rascal-runner/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const (
2727
defaultInstructionsFile = "instructions.md"
2828
defaultCommitMsgFile = "commit_message.txt"
2929
defaultPRBodyFile = "pr_body.md"
30+
defaultPRLabel = "rascal"
3031
)
3132

3233
var (
@@ -303,6 +304,7 @@ func runWithExecutor(ex commandExecutor) error {
303304
"--repo", cfg.Repo,
304305
"--base", cfg.BaseBranch,
305306
"--head", cfg.HeadBranch,
307+
"--label", defaultPRLabel,
306308
"--title", commitTitle,
307309
"--body-file", cfg.PRBodyPath,
308310
)

cmd/rascal-runner/main_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,18 @@ case "$cmd" in
670670
exit 1
671671
;;
672672
create)
673+
has_label=false
674+
while [ "$#" -gt 0 ]; do
675+
if [ "$1" = "--label" ] && [ "$#" -ge 2 ] && [ "$2" = "rascal" ]; then
676+
has_label=true
677+
break
678+
fi
679+
shift
680+
done
681+
if [ "$has_label" != true ]; then
682+
echo "expected gh pr create to include --label rascal" >&2
683+
exit 1
684+
fi
673685
: > "$state_dir/pr_created"
674686
printf 'https://github.com/owner/repo/pull/77\n'
675687
exit 0

0 commit comments

Comments
 (0)