dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Return commit history from create_status_json

Open mattmontgomery opened this issue 7 years ago • 1 comments

This is a work-in-progress PR to add commit history for data, results and sources repositories.

To support an output that includes git commit history, an environment variable with a Github token will need to be set.

Example: GITHUB_TOKEN=... django-admin.py create_status_json > ../openelections.github.io/data/state_status.json

JSON Data sample

{
    "data_repo_changes": [
        {
            "date": "2016-12-31 01:41:46",
            "sha": "c42f9eaf3ce3a1e5fcf6e0defd89f1f64860c2aa",
            "message": "fixed filename",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/c42f9eaf3ce3a1e5fcf6e0defd89f1f64860c2aa",
            "committer": ""
        },
        {
            "date": "2016-12-31 01:41:06",
            "sha": "9b2251ff36ceff2d91158967745b1a0de44ef37a",
            "message": "Merge pull request #4 from ra-data/master\n\n2014 November general elections for AK by precinct",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/9b2251ff36ceff2d91158967745b1a0de44ef37a",
            "committer": ""
        },
        {
            "date": "2016-12-31 01:17:58",
            "sha": "c26e7eceb97644d47f0246378d3fe8de1a792f6e",
            "message": "2014 November general elections for AK by precinct\n\nRaw data at\nhttp://elections.alaska.gov/results/14GENR/data/results-precinct.txt",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/c26e7eceb97644d47f0246378d3fe8de1a792f6e",
            "committer": ""
        },
        {
            "date": "2016-12-31 01:12:29",
            "sha": "0bba8a7df03288831213d07ef624647e648d2c6f",
            "message": "renamed 2016 general file",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/0bba8a7df03288831213d07ef624647e648d2c6f",
            "committer": ""
        },
        {
            "date": "2016-12-31 01:11:01",
            "sha": "ebce0dc76bc99d81a6f45c1b9e618775f065e574",
            "message": "Merge pull request #3 from ra-data/master\n\n2016 November general elections for AK by precinct",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/ebce0dc76bc99d81a6f45c1b9e618775f065e574",
            "committer": ""
        },
        {
            "date": "2016-12-30 23:43:32",
            "sha": "41aa77d075d02ff07fa12b6d9378d0addf22bb61",
            "message": "2016 November general elections for AK by precinct\n\n2016 November general elections for AK by precinct. AK does not have\ncounties. Instead State House districts are being reported. Note NP, NA\nas parties reported directly from AK data.",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/41aa77d075d02ff07fa12b6d9378d0addf22bb61",
            "committer": ""
        },
        {
            "date": "2016-11-27 03:42:30",
            "sha": "c96799a20fa6b000836de1edd962933aca94366f",
            "message": "added 2016 primary file",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/c96799a20fa6b000836de1edd962933aca94366f",
            "committer": ""
        },
        {
            "date": "2016-11-27 01:20:30",
            "sha": "f8a56910af9321986dfcb83ccea4ce8942606290",
            "message": "added 2016 Dem presidential caucus",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/f8a56910af9321986dfcb83ccea4ce8942606290",
            "committer": ""
        },
        {
            "date": "2014-08-01 14:58:05",
            "sha": "ecc4dbf62541686ba13ad7946eaafe8ec5f6bed1",
            "message": "Initial commit",
            "url": "https://api.github.com/repos/openelections/openelections-data-ak/commits/ecc4dbf62541686ba13ad7946eaafe8ec5f6bed1",
            "committer": ""
        }
    ],
    "volunteers": [],
    "results_repo_changes": [],
    "name": "Alaska",
    "dev_volunteers": [],
    "results_status": null,
    "sources_repo_changes": [],
    "postal": "AK",
    "metadata_volunteers": [],
    "metadata_status": ""
}

mattmontgomery avatar Mar 05 '17 16:03 mattmontgomery

Just out of curiosity (feel free to ignore....):

Is this associated with an "issue" in github, for more context?

To support an output that includes git commit history, an environment variable with a Github token will need to be set.

Who needs to set it, and when?

nealmcb avatar Mar 05 '17 20:03 nealmcb