Skip to content

Commit 681868f

Browse files
committed
wip
wip
1 parent d430015 commit 681868f

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 }} \

llvm/utils/git/github-automation.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,12 @@ def execute_command(self) -> bool:
629629
print(sys.stdin.readlines())
630630
return False
631631

632+
class CompileTimeBot:
633+
def __init__(self, pr_number: int):
634+
self.pr_numer = pr_number
635+
636+
def run(self) -> bool:
637+
pass
632638

633639
parser = argparse.ArgumentParser()
634640
parser.add_argument(
@@ -688,6 +694,9 @@ def execute_command(self) -> bool:
688694
help="Set the default user and email for the git repo in LLVM_PROJECT_DIR to llvmbot",
689695
)
690696

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+
691700
args = parser.parse_args()
692701

693702
if args.command == "issue-subscriber":
@@ -720,3 +729,6 @@ def execute_command(self) -> bool:
720729
sys.exit(1)
721730
elif args.command == "setup-llvmbot-git":
722731
setup_llvmbot_git()
732+
elif args.command == "compile-time-bots":
733+
compile_time_bot = CompileTimeBot(args.pr_number)
734+
compile_time_bot.run()

0 commit comments

Comments
 (0)