Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributor rankings #1022

Merged
merged 31 commits into from
Oct 10, 2023
Merged

Contributor rankings #1022

merged 31 commits into from
Oct 10, 2023

Conversation

roddas
Copy link
Contributor

@roddas roddas commented Oct 5, 2023

What kind of changes does this PR include?

  • Fixes or refactors
  • A new challenge
  • Additional documentation
  • Something else

Description

Relations

Closes #984

References

Checklist:

  • All the contributions made are solely the work of me and my co-authors
  • I tested the changes in this PR (if applicable)
  • I added unit tests to ensure my change works (when change in Java or on front-end code)
  • I added UI tests to ensure my UI changes work (when change in the overall UI, not needed if just adding a challenge)
  • The PR passes pre-commit hooks and automated tests

@roddas
Copy link
Contributor Author

roddas commented Oct 5, 2023

Until now, the code performs the following:

  • It retrieves the contributors list of Wrongsecrets, Wrongsecrets binaries and Wrongsecrets CTF, using the GitHub API's
  • It groups the user by its ranking : top contributor and contributor ( according to the pontuation rules) and prints

I'd like to be cleared about add "Special thanks" and "tester" listing as hardcoded part of the script .

To execute the script you must create the .env file and store your github token.

Set up the token

Copy link
Collaborator

@commjoen commjoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @roddas this is a great starting point!
What i am basically looking for, is a script that can generate the listing at https://github.com/OWASP/wrongsecrets/blob/master/README.md#special-thanks--contributors and https://github.com/OWASP/wrongsecrets/blob/master/src/main/resources/templates/welcome.html#L104-L150 automatically based on the statistics you already have of the 3 repositories.

scripts/sort_contibutors/main.py Outdated Show resolved Hide resolved
scripts/sort_contibutors/main.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@commjoen commjoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @roddas ,
i tested teh script and it looks promising! Not sure if it takes the full history of every repo for some reason, as some stats are still relatively low.

Can we maybe have a filter for folks that are only present at wrongsecrets-ctf-party :) ?

scripts/sort_contibutors/main.py Show resolved Hide resolved
scripts/sort_contibutors/main.py Show resolved Hide resolved
scripts/sort_contibutors/main.py Outdated Show resolved Hide resolved
Comment on lines 157 to 158
print("[+] Fetching the Wrong Secrets contributors list ... ")
wrongsecrets_list = fetch_repository('wrongsecrets', token)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason for fetching it twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I'll fix it now .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fixed.

@commjoen
Copy link
Collaborator

One more thing:
There are a few names put out as none , can we for those create a list of full names and github IDs so we can still print them out? then all is in i guess :). Great job @roddas !

roddas and others added 6 commits October 10, 2023 08:42
Co-authored-by: Jeroen Willemsen <jeroenwillemsen2001@gmail.com>
Co-authored-by: Jeroen Willemsen <jeroenwillemsen2001@gmail.com>
Copy link
Collaborator

@commjoen commjoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is beautiful! Thank you for your hard work @roddas ! You rock!

@commjoen commjoen merged commit 52aa5f2 into OWASP:master Oct 10, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revise contributor rankings
2 participants