Skip to content

Commit

Permalink
Added basic blocklist functionality
Browse files Browse the repository at this point in the history
- A .gitignore file has been added to prevent pushing of files of blocked participants
- lakefs.yml has been removed and lakeFS has been added to the blocklist
- umbraco.yml has been removed umbraco has been added to the blocklist
- Update script has been extended to process entries in the block list

Resolves #137
  • Loading branch information
SoftCreatR committed Oct 1, 2020
1 parent e5c2c6d commit ce1585b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Blocklist start
lakefs*
umbraco*
# Blocklist end
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ In all of the hacktoberfest excitement, many companies want to join the celebrat
| [Hasura](https://hasura.io) | ![Shirt](icons/shirt.png) ![Stickers](icons/stickers.png) | Submit a PR for one of our issues with the label hacktoberfest: For all valid PRs attempting to close an issue labelled hacktoberfest, we’ll send out some amazing Hasura - Hacktoberfest swag | [Details](https://hasura.io/blog/hasura-joins-hacktoberfest-3rd-year-in-a-row/) |
| [InfraCloud](https://www.infracloud.io) | ![Shirt](icons/shirt.png) ![Stickers](icons/stickers.png) | Make a PR or more on InfraCloud’s open-source projects – Fission or Botkube. To deliver the swags, we will reach out to you once PR(s) gets merged. A person with maximum merged PRs will also get a Kindle from our side | [Details](https://twitter.com/infracloudio/status/1310980826541092865) |
| [Kong](https://konghq.com) | ![Shirt](icons/shirt.png) | If your Pull Request to Kong/kong was accepted, and it fixes a bug, adds functionality, or makes it significantly easier to use or understand Kong, congratulations! You are eligible to receive the very special Contributor T-shirt! Go ahead and fill out the Contributors Submissions form | [Details](https://github.com/Kong/kong/blob/master/CONTRIBUTING.md#contributor-t-shirt) |
| [lakeFS](https://lakefs.io) | ![Shirt](icons/shirt.png) ![Stickers](icons/stickers.png) | 1 PR on our GitHub repo for a collection of stickers, 2 or more gets stickers and a lakeFS t-shirt 👕 | [Details](https://docs.lakefs.io/contributing#get-ready-for-hacktoberfest) |
| [LoginRadius](https://www.loginradius.com) | ![Shirt](icons/shirt.png) | LoginRadius will be part of hacktoberfest and yes, we are here with some cool swags. We have got around 500 t-shirts for people contributing to our open source repositories | [Details](https://www.loginradius.com/engineering/blog/loginradius-supports-hacktoberfest-2020) |
| [MayaData](https://mayadata.io) | ![Shirt](icons/shirt.png) ![Stickers](icons/stickers.png) | When your PR to any of the repositories ([OpenEBS](https://github.com/openebs/openebs) / [LitmusChaos](https://github.com/litmuschaos/litmus)) is merged, we will contact you to fill out a form to send a special edition swags designed for Hacktoberfest. BEST PR wins a grand prize. Remember, no contribution is too small, and everyone was a rookie at some point in time. From documentation updates to bug fixes or small feature improvements, every pull request has value and helps make the world a better place | [Details](https://blog.mayadata.io/celebrate-hacktoberfest-2020-open-source-with-mayadata) |
| [Vonage (Nexmo)](https://www.vonage.com) | ![Socks](icons/socks.png) | If you have made a valid contribution to one of our repos, you can choose to receive either a $5 Open Collective Gift Card or a pair of Bamboo Vonage Socks! | [Details](https://developer.nexmo.com/hacktoberfest) |
Expand Down Expand Up @@ -68,7 +67,6 @@ In all of the hacktoberfest excitement, many companies want to join the celebrat
| [SAP](https://www.sap.com) | ![Swag](icons/swag.png) | A book from sap press for the user who create more pull requests in the ABAP Projects | [Details](https://blogs.sap.com/2019/10/04/lets-code-share-and-learn.-calling-abapers-to-next-edition-of-hacktoberfest) |
| [Sense/Net](https://www.sensenet.com) | ![Shirt](icons/shirt.png) | The first 100 participants who make a pull request | [Details](https://community.sensenet.com/blog/2019/10/01/hacktoberfest-is-here) |
| [Twilio](https://www.twilio.com) | ![Stickers](icons/stickers.png) ![Swag](icons/swag.png) | One PR gets you a collection of stickers, 2 or more gets stickers and a pair of Twilio socks | [Details](https://www.twilio.com/blog/ahoy-hacktoberfest-2019) |
| [Umbraco](https://umbraco.com/) | ![Shirt](icons/shirt.png) ![Swag](icons/swag.png) | You’ll need to have at least 1 PR approved on any Umbraco repository | [Details](https://umbraco.com/blog/hacktoberfest-2019/) |
| [Uno](https://platform.uno) | ![Shirt](icons/shirt.png) ![Swag](icons/swag.png) | Anyone who contributes a pull request to the Uno Platform on GitHub between October 1 and October 31 will receive a Uno Platform T-shirt plus some limited edition swag | [Details](https://platform.uno/uno-is-joining-hacktoberfest-2019/) |
| [Valor](https://valor-software.com) | ![Stickers](icons/stickers.png) ![Swag](icons/swag.png) | 1 PR: pen and sticker. 3 PRs: notepad or wooden phone stand. 5 PRs: pen, sticker, notepad, and a wooden phone stand | [Details](https://valor-software.com/articles/hacktoberfest-2019-is-coming-and-ngx-bootstrap-strives-for-your-attention.html) |
| [Xamarin / Microsoft](https://dotnet.microsoft.com/apps/xamarin) | ![Shirt](icons/shirt.png) ![Stickers](icons/stickers.png) ![Swag](icons/swag.png) | 1 pull request for the stickers, 4 pull requests for a T-shirt, 10 pull requests to be eligible to win a trophy | [Details](https://devblogs.microsoft.com/xamarin/hacktoberfest-2019-xamarin-edition) |
Expand Down
8 changes: 0 additions & 8 deletions participants/2019/umbraco.yml

This file was deleted.

8 changes: 0 additions & 8 deletions participants/2020/lakefs.yml

This file was deleted.

28 changes: 28 additions & 0 deletions update_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,27 @@
current_year = datetime.datetime.now().strftime("%Y")


def read_blocklist():
entries = []

with open('.gitignore') as blocklist:
add_entry = False

for line in blocklist:
if line.strip() == "# Blocklist start":
add_entry = True
continue
elif line.strip() == "# Blocklist end":
add_entry = False
continue
elif add_entry:
entries.append(line.strip().replace('*', '').lower())

return entries


def get_participants():
blocklist = read_blocklist()
last_year = str((int(current_year) - 1))
ret = []

Expand All @@ -50,6 +70,14 @@ def get_participants():
try:
data = yaml.safe_load(stream)

# Do not add blocked participants
if path.basename(file).lower() in blocklist or data['Name'].replace(' ', '').lower() in blocklist:
# Delete PARTICIPANT.yml, because it's blocked in /.gitignore
if path.isfile(file):
os.remove(file)

continue

# We assume, that all files in participants/CURRENT_YEAR are "verified"
if file.startswith("participants" + path.sep + current_year + path.sep):
if 'IsSponsor' in data and data['IsSponsor'] is True:
Expand Down

0 comments on commit ce1585b

Please sign in to comment.