Skip to content

Conversation

stevenhorsman
Copy link
Member

Various updates to the generate_electorate python script to fix a few bugs, update it to make processing much quicker, give a more consistent output and make it easier to run.

@stevenhorsman
Copy link
Member Author

An example of how to run the updated script:

$ GH_TOKEN=XXX .venv/bin/python ./generate_electorate.py -end 07/04/25
Getting committers from 2024-04-07 00:00:00  ->  2025-04-07 00:00:00
Skipping repo kata-containers/proxy
Skipping repo kata-containers/agent
Skipping repo kata-containers/shim
Skipping repo kata-containers/osbuilder
Skipping repo kata-containers/tests
Skipping repo kata-containers/runtime
Skipping repo kata-containers/qemu
Skipping repo kata-containers/linux
Skipping repo kata-containers/ksm-throttler
Skipping repo kata-containers/govmm
Looking for changes in kata-containers/www.katacontainers.io between 2024-04-07 00:00:00 and 2025-04-07 00:00:00
Looking for changes in kata-containers/community between 2024-04-07 00:00:00 and 2025-04-07 00:00:00
Looking for changes in kata-containers/kata-containers between 2024-04-07 00:00:00 and 2025-04-07 00:00:00
Skipping repo kata-containers/documentation
Skipping repo kata-containers/packaging
Skipping repo kata-containers/ci
Looking for changes in kata-containers/.github between 2024-04-07 00:00:00 and 2025-04-07 00:00:00
Skipping repo kata-containers/slash-command-action
Skipping repo kata-containers/cgroups-rs
Looking for changes in kata-containers/directvolume between 2024-04-07 00:00:00 and 2025-04-07 00:00:00
Skipping repo kata-containers/is-organization-member
Skipping repo kata-containers/resolve-pr-refs
Skipping repo kata-containers/project-infra
Skipping repo kata-containers/edk2
Looking for changes in kata-containers/presentations between 2024-04-07 00:00:00 and 2025-04-07 00:00:00
Skipping repo kata-containers/kata-containers-github-actions-tests
Looking for changes in kata-containers/tardev-snapshotter between 2024-04-07 00:00:00 and 2025-04-07 00:00:00
Skipping repo kata-containers/dbs-snapshot
Looking for changes in kata-containers/kata-containers.github.io between 2024-04-07 00:00:00 and 2025-04-07 00:00:00
Skipping repo kata-containers/kata-containers-ghsa-ghrx-gv9w-rr83
Skipping repo kata-containers/kata-containers-ghsa-6q64-gfcg-xm54

@stevenhorsman stevenhorsman force-pushed the generate-electorate-updates branch 2 times, most recently from 0a0a1b4 to dd02bc0 Compare May 2, 2025 11:09
- Update the list to skip some archived projects
and the github security advisory repos to save time
- Remove some repos we no longer have
- Sort the list so it's easier to compare

Signed-off-by: stevenhorsman <[email protected]>
We no longer use stable branches, and topic branches
shouldn't be considered, so only get commits from the default
branch (`main` currently)

Signed-off-by: stevenhorsman <[email protected]>
We are currently considering the merge commit
as a code contribution, so fix this

Signed-off-by: stevenhorsman <[email protected]>
Updates to mean the user doesn't need to edit code
to customise the script, but instead:
- Read the github token from an env
- Accept the end and (optional) start dates to use in the commit scans

Update the python file to have functions and a `main` method

Signed-off-by: stevenhorsman <[email protected]>
@stevenhorsman stevenhorsman force-pushed the generate-electorate-updates branch from dd02bc0 to 08d2d0d Compare May 29, 2025 08:31
@stevenhorsman stevenhorsman reopened this May 29, 2025
@stevenhorsman stevenhorsman reopened this May 29, 2025
We have some users (maybe as they have changed email, or
don't have a public email on github), that we can't find gh logins
for, so we've just used the email, but this could result in us double
counting emails in the electorate list, so instead provide a mapping
of these problematic emails to the correct github username and
add warning messages to let users know to keep these up-to-date.

Signed-off-by: stevenhorsman <[email protected]>
@stevenhorsman stevenhorsman force-pushed the generate-electorate-updates branch from 08d2d0d to c223719 Compare June 23, 2025 16:03
@stevenhorsman
Copy link
Member Author

@wainersm @ildikov - this might be useful for the election.

@ildikov
Copy link
Contributor

ildikov commented Sep 30, 2025

Thank you! We've just been chatting about this PR. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants