Skip to content

Commit ee2d89c

Browse files
Merge pull request #370 from Mr-Sunglasses/main
Added Automerge GH Action
2 parents 47ec2cf + 550302f commit ee2d89c

File tree

2 files changed

+61
-9
lines changed

2 files changed

+61
-9
lines changed

.github/workflows/automerge.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: automerge
2+
on:
3+
pull_request:
4+
types:
5+
- labeled
6+
- unlabeled
7+
- synchronize
8+
- opened
9+
- edited
10+
- ready_for_review
11+
- reopened
12+
- unlocked
13+
pull_request_review:
14+
types:
15+
- submitted
16+
check_suite:
17+
types:
18+
- completed
19+
status: {}
20+
jobs:
21+
automerge:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- id: automerge
25+
name: automerge
26+
uses: "pascalgn/[email protected]"
27+
env:
28+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

script.py

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,38 @@
1-
import os
1+
import os
22
import time
33

44
import argparse as parsing
55

66

7-
parser = parsing.ArgumentParser(description="ReadME.md to .html writer",formatter_class=parsing.ArgumentDefaultsHelpFormatter)
8-
9-
parser.add_argument('-i', '--input', action='store', type=str, required=True, help="name of the input file eg. template.html")
10-
parser.add_argument('-t', '--title', action='store', type=str, default='Progress', help="title of the html page." )
11-
parser.add_argument('-o', '--output', action='store', type=str, required=True, help="the generated output file name , which is generated in dist folder. eg. template.html")
7+
parser = parsing.ArgumentParser(
8+
description="ReadME.md to .html writer",
9+
formatter_class=parsing.ArgumentDefaultsHelpFormatter,
10+
)
11+
12+
parser.add_argument(
13+
"-i",
14+
"--input",
15+
action="store",
16+
type=str,
17+
required=True,
18+
help="name of the input file eg. template.html",
19+
)
20+
parser.add_argument(
21+
"-t",
22+
"--title",
23+
action="store",
24+
type=str,
25+
default="Progress",
26+
help="title of the html page.",
27+
)
28+
parser.add_argument(
29+
"-o",
30+
"--output",
31+
action="store",
32+
type=str,
33+
required=True,
34+
help="the generated output file name , which is generated in dist folder. eg. template.html",
35+
)
1236

1337
args = parser.parse_args()
1438

@@ -17,7 +41,7 @@
1741
OUTPUT_NAME = args.output
1842

1943
try:
20-
os.system('npm install github-readme-to-html')
44+
os.system("npm install github-readme-to-html")
2145
except:
2246
print("NPM is not Installed")
2347
print("Try : sudo apt install nodejs | sudo apt install npm ")
@@ -27,6 +51,6 @@
2751
time.sleep(15)
2852

2953
try:
30-
os.system(f'npx github-readme-to-html -i {FILE_NAME} -t {TITLE} -o {OUTPUT_NAME}')
54+
os.system(f"npx github-readme-to-html -i {FILE_NAME} -t {TITLE} -o {OUTPUT_NAME}")
3155
except:
32-
print("Please Check If file is exit")
56+
print("Please Check If file is exit")

0 commit comments

Comments
 (0)