balsama / drupalcreditees

Parses data from Drupal git logs and Drupal.org API to gather data about Drupal.urg users who have gotten credit for contributing to Drupal.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drupal Creditees

Parses data from Drupal git logs and Drupal.org API to gather data about Drupal.urg users who have gotten credit for contributing to Drupal.

The /data directory contains two files commits.json and creditees.json which are generated by GatherCommits and GatherCreditees commands respectively. You must generate the commits.json file first (or provide your own manually to the Creditees.php class).

Where's the data?

The files in the data directory are large (> 100 MB, 700k lines for the commitees.json file). They are not committed to this repo. You will need to generate them yourself. To save unnecessary traffic to the D.O API, you can also download a copy of the files here: https://drive.google.com/drive/folders/1J1-WjiCKrDApMte7PBeVQ0eOgtgGf-3n?usp=sharing

Instructions

  1. Copy config/example.config.yml to config/config.yml.
  2. Modify config.yml as necesarry. At a minimum, you must provide a uniqe useragent string.
  3. Run the following commands:

To generate the commits.json file:

  • $ php ./bin/app.php gather:commits

To generate the creditees.json file:

  • $ php ./bin/app.php gather:creditees

To generate the creditees.json file:

  • $ php ./bin/app.php process:stats --generate <CALLABLE_FUNCTION>
    Callable function examples:
    • recentNewCreditees
    • crediteesByMonth
      These are currently hardcoded to output files in certain directories.

Formats

creditees.json

Contains all users with at least one credit on a Drupal core commit.

Format:

{
    "hooroomoo": {
        "name": "hooroomoo",
        "firstCommit": {
            "date": {
                "date": "2022-05-18 14:53:59.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "message": "Issue #3259593 by hooroomoo, Dom., Wim Leers, bnjmnm, lauriii: Alignment being available as separate buttons AND in dropdown is confusing\n",
            "creditees": [
                "hooroomoo",
                "Dom.",
                "Wim Leers",
                "bnjmnm",
                "lauriii"
            ],
            "issueNumber": 3259593,
            "hash": "a9a069604caf6de83e2416b31825a487ff590cbb"
        },
        "firstCommitTimestamp": 1652900039,
        "mostRecentCommit": {
            "date": {
                "date": "2022-05-18 14:53:59.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "message": "Issue #3259593 by hooroomoo, Dom., Wim Leers, bnjmnm, lauriii: Alignment being available as separate buttons AND in dropdown is confusing\n",
            "creditees": [
                "hooroomoo",
                "Dom.",
                "Wim Leers",
                "bnjmnm",
                "lauriii"
            ],
            "issueNumber": 3259593,
            "hash": "a9a069604caf6de83e2416b31825a487ff590cbb"
        },
        "mostRecentCommitTimestamp": 1652900039,
        "accountCreatedTimestamp": 1631653195,
        "uid": 3688872
    },
    {
        [...]
    }
}

commits.json

Contains all of the git commits from Drupal.

Format:

{
    "a9a069604caf6de83e2416b31825a487ff590cbb": {
        "date": {
            "date": "2022-05-18 14:53:59.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "message": "Issue #3259593 by hooroomoo, Dom., Wim Leers, bnjmnm, lauriii: Alignment being available as separate buttons AND in dropdown is confusing\n",
        "creditees": [
            "hooroomoo",
            "Dom.",
            "Wim Leers",
            "bnjmnm",
            "lauriii"
        ],
        "issueNumber": 3259593,
        "hash": "a9a069604caf6de83e2416b31825a487ff590cbb"
    },
    {
        [...]
    }
}

About

Parses data from Drupal git logs and Drupal.org API to gather data about Drupal.urg users who have gotten credit for contributing to Drupal.


Languages

Language:PHP 100.0%