From ce1585b4a7318e3cd8bb6225fb53bbddea9516c9 Mon Sep 17 00:00:00 2001 From: Sascha Greuel Date: Fri, 2 Oct 2020 00:40:31 +0200 Subject: [PATCH] Added basic blocklist functionality - 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 --- .gitignore | 4 ++++ README.md | 2 -- participants/2019/umbraco.yml | 8 -------- participants/2020/lakefs.yml | 8 -------- update_readme.py | 28 ++++++++++++++++++++++++++++ 5 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 .gitignore delete mode 100644 participants/2019/umbraco.yml delete mode 100644 participants/2020/lakefs.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..95a6c0d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Blocklist start +lakefs* +umbraco* +# Blocklist end diff --git a/README.md b/README.md index a9076d1..293b675 100644 --- a/README.md +++ b/README.md @@ -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) | @@ -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) | diff --git a/participants/2019/umbraco.yml b/participants/2019/umbraco.yml deleted file mode 100644 index 8d7e95e..0000000 --- a/participants/2019/umbraco.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -Name: Umbraco -Website: https://umbraco.com/ -Swag: - - shirt - - swag -Description: "You’ll need to have at least 1 PR approved on any Umbraco repository." -Details: https://umbraco.com/blog/hacktoberfest-2019/ diff --git a/participants/2020/lakefs.yml b/participants/2020/lakefs.yml deleted file mode 100644 index b34334a..0000000 --- a/participants/2020/lakefs.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -Name: lakeFS -Website: https://lakefs.io -Swag: - - stickers - - shirt -Description: "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 diff --git a/update_readme.py b/update_readme.py index 1135f50..bf00f56 100644 --- a/update_readme.py +++ b/update_readme.py @@ -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 = [] @@ -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: