Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
PR stop script
Browse files Browse the repository at this point in the history
  • Loading branch information
dyakovri committed Feb 13, 2023
1 parent 0247792 commit c650673
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 32 deletions.
File renamed without changes.
17 changes: 17 additions & 0 deletions scripts/pr_stop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import argparse
import re
from subprocess import Popen


def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('--repo-url', type=str, required=True)
parser.add_argument('--git-ref', type=str, required=True)
return parser.parse_args()


if __name__ == "__main__":
args = get_args()
_, org, repo = args.repo_url.rsplit('/', 2)
pr_num = re.match("^refs/pull/(?P<pr_num>\d+)", args.git_ref).group('pr_num')
Popen(['docker', 'rm', '-f', f'pkff_dev__{repo}__pr{pr_num}']).communicate()
32 changes: 0 additions & 32 deletions scripts/test.sh

This file was deleted.

0 comments on commit c650673

Please sign in to comment.