File tree 2 files changed +43
-0
lines changed 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Compile Time Bot
2
+
3
+ on :
4
+ issue_comment :
5
+ types :
6
+ - created
7
+
8
+ jobs :
9
+ compile-time-bot :
10
+ if : >-
11
+ github.event.issue.pull_request &&
12
+ contains(github.event.comment.body, '@llvm-compile-time-bot test')
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Fetch LLVM sources
16
+ uses : actions/checkout@v4
17
+ with :
18
+ persist-credentials : false
19
+
20
+ - name : Setup Environment
21
+ run : |
22
+ pip install -r ./llvm/utils/git/requirements.txt
23
+
24
+ - name : Run Action
25
+ run : |
26
+ printf "%s" "$COMMENT_BODY" |
27
+ ./llvm/utils/git/github-automation.py \
28
+ --repo "$GITHUB_REPOSITORY" \
29
+ compile-time-bot \
30
+ --pr-number ${{ github.event.issue.number }}
31
+ #--token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
Original file line number Diff line number Diff line change @@ -629,6 +629,12 @@ def execute_command(self) -> bool:
629
629
print (sys .stdin .readlines ())
630
630
return False
631
631
632
+ class CompileTimeBot :
633
+ def __init__ (self , pr_number : int ):
634
+ self .pr_numer = pr_number
635
+
636
+ def run (self ) -> bool :
637
+ pass
632
638
633
639
parser = argparse .ArgumentParser ()
634
640
parser .add_argument (
@@ -688,6 +694,9 @@ def execute_command(self) -> bool:
688
694
help = "Set the default user and email for the git repo in LLVM_PROJECT_DIR to llvmbot" ,
689
695
)
690
696
697
+ compile_time_bot_parser = subparsers .add_parser ("compile-time-bot" )
698
+ compile_time_bot_parser .add_argument ("--pr-number" , type = int , required = True )
699
+
691
700
args = parser .parse_args ()
692
701
693
702
if args .command == "issue-subscriber" :
@@ -720,3 +729,6 @@ def execute_command(self) -> bool:
720
729
sys .exit (1 )
721
730
elif args .command == "setup-llvmbot-git" :
722
731
setup_llvmbot_git ()
732
+ elif args .command == "compile-time-bots" :
733
+ compile_time_bot = CompileTimeBot (args .pr_number )
734
+ compile_time_bot .run ()
You can’t perform that action at this time.
0 commit comments