Skip to content

Commit 8bb054e

Browse files
committed
added github action files & updated database
1 parent df8bb61 commit 8bb054e

File tree

4 files changed

+69
-1
lines changed

4 files changed

+69
-1
lines changed

.github/pull_request_template.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,38 @@ _Please delete options that are not relevant._
3636
- [ ] My documentation follows [`Template for README.md`](https://github.com/avinashkranjan/Amazing-Python-Scripts/blob/master/Template%20for%20README.md)
3737
- [ ] My changes generate no new warnings
3838
- [ ] I have added tests/screenshots(if any) that prove my fix is effective or that my feature works.
39+
40+
## Project Metadata
41+
42+
`` If there is nothing to fill with, then type: none ``
43+
44+
Category:
45+
- [ ] Calculators
46+
- [ ] AI/ML
47+
- [ ] Scrappers
48+
- [ ] Social_Media
49+
- [ ] PDF
50+
- [ ] Image_Processing
51+
- [ ] Video_Processing
52+
- [ ] Games
53+
- [ ] Networking
54+
- [ ] OS_Utilities
55+
- [ ] Automation
56+
- [ ] Cryptography
57+
- [ ] Computer_Vision
58+
- [ ] Fun
59+
- [ ] Others
60+
61+
Title: \<write scrip title here\>
62+
63+
Folder: \<type the folder name that contains your script\>
64+
65+
Requirments: \<type the name of text file containing the required to install python packages\>
66+
67+
Script: \<Enter the name of the ``.py`` file\>
68+
69+
Arguments: \<enter any arguments that the script needs but `-` separeted like: h-c-m\>
70+
71+
Contributor: \<Enter your Github handle/username\>
72+
73+
Description: \<Enter a one line description that describes your script\>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Python package
2+
3+
on:
4+
pull_request:
5+
# Will trigger on closed PRs
6+
types: [closed]
7+
8+
jobs:
9+
extract_and_update:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Python 3.6
15+
# Checks if PR is merged (subflag)
16+
if: ${{ github.event.pull_request.merged == true }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.6'
20+
21+
- name: Run script
22+
# Checks if PR is merged (subflag)
23+
if: ${{ github.event.pull_request.merged == true }}
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install PyGithub
27+
python ./.github/scripts/Update_Database.py "$body" "$token"
28+
env:
29+
body: ${{ github.event.pull_request.body }}
30+
token: ${{ secrets.GITHUB_TOKEN }}

Master Script/Script.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
parser = OptionParser()
1515
parser.add_option("-a", "--add", action="store_true", dest="add", help="Goes straight to the add script phase")
1616

17+
18+
# The database is automatically updated after the PR is merged.
19+
# ONLY Use this function if you were asked to, to manually add projects to the database.
1720
def add_script():
1821
""" Add a Contributor script through a series of inputs """
1922
print("Double check inputs before pressing enter. If one input is incorrect press CTRL-C and re-run the script")

Master Script/datastore.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)