opengaming / osgameclones

Open Source Clones of Popular Games
https://osgameclones.com/
Other
1.67k stars 310 forks source link

Hacktoberfest #1153

Closed cxong closed 3 years ago

cxong commented 3 years ago

This year's hacktoberfest is opt-in; repos must add the hacktoberfest topic to have PRs count. https://hacktoberfest.digitalocean.com/hacktoberfest-update

Should osgameclones participate? @piranha

By the way, here's a list of games from our list that have the hacktoberfest topic:

And here's the script to find them (need to generate a personal access token and to install pygithub):

import re
import sys

from github import Github
from pathlib import Path

import yaml

REGEX = re.compile(r"https://github.com/([^/]+)/([^/]+)")

def main():
    g = Github(sys.argv[1])
    hacktober_games = {}
    for p in Path('games').iterdir():
        if p.is_file() and p.suffix == ".yaml":
            games = yaml.safe_load(open(p, encoding="utf-8"))
            for game in games:
                match = re.match(REGEX, game.get("repo", ""))
                if match:
                    owner, repo = match.groups()
                    topics = g.get_repo(f"{owner}/{repo}").get_topics()
                    if "hacktoberfest" in topics:
                        hacktober_games[game["name"]] = game
    for name, game in hacktober_games.items():
        print(name, game["repo"])

if __name__ == "__main__":
    main()
piranha commented 3 years ago

@cxong why not? :-) I mean, the only downside is that we can receive a spammy pull request, right? :)

BTW, we could indicate those hacktoberfest games on site. :)

cxong commented 3 years ago

Cool! Could you please add the topic? I'm not able to do so

piranha commented 3 years ago

Ah, I had no idea!