Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Bots of CPython

The Bots of CPython

Presented at Global Maintainer Summit 2021
https://globalmaintainersummit.github.com/

Mariatta
PRO

June 09, 2021
Tweet

More Decks by Mariatta

Other Decks in Technology

Transcript

  1. The Bots of CPython
    1
    Mariatta Wijaya

    View Slide

  2. Mariatta Wijaya
    @mariatta
    2
    Python Core Developer
    core-workflow, emoji, documentation
    she/her
    Vancouver, Canada
    UTC - 7
    Staff Software Engineer @ Uplight

    View Slide

  3. CORE-WORKFLOW
    https://github.com/python/core-workflow
    https://mail.python.org/mailman3/lists/core-workflow.python.org/
    https://discuss.python.org/c/core-workflow/8
    3
    A place to discuss and work on
    improvements to the Python core
    development workflow and the
    infrastructure that supports the workflow.
    Example: issue tracker, buildbots, tools,
    automations, bots, contributor
    experience, mentorship, issue triaging,
    documentation, etc
    @mariatta
    The Bots of CPython

    View Slide

  4. MEET OUR BOTS
    the-knights-who-say-ni bedevere-bot miss-islington
    4
    @mariatta
    The Bots of CPython

    View Slide

  5. the-knights-who-say-ni
    Ni!
    “We also demand …. A SHRUBBERY!”
    Checks if CLA has been signed.
    Applies [CLA signed] / [CLA not signed] labels
    5
    https://github.com/python/the-knights-who-say-ni
    @mariatta
    The Bots of CPython

    View Slide

  6. HOW IT WORKS
    6
    PR opened/re-opened
    Check if CLA was signed
    Apply “CLA Signed” or
    “CLA not signed” label
    bugs.python.org
    @mariatta
    The Bots of CPython

    View Slide

  7. HOW IT WORKS
    6
    PR opened/re-opened
    Check if CLA was signed
    Apply “CLA Signed” or
    “CLA not signed” label
    👩💻
    Signs CLA
    bugs.python.org
    @mariatta
    The Bots of CPython

    View Slide

  8. HOW IT WORKS
    6
    PR opened/re-opened
    Check if CLA was signed
    Apply “CLA Signed” or
    “CLA not signed” label
    👩💻
    Signs CLA
    bugs.python.org
    ❌ No webhook
    @mariatta
    The Bots of CPython

    View Slide

  9. HOW IT WORKS
    7
    PR opened/re-opened
    Check if CLA was
    Apply “CLA Signed” or
    “CLA not signed” label
    👩💻
    Signs CLA
    bugs.python.org
    @mariatta
    The Bots of CPython

    View Slide

  10. HOW IT WORKS
    7
    PR opened/re-opened
    Check if CLA was
    Apply “CLA Signed” or
    “CLA not signed” label
    👩💻
    Signs CLA
    bugs.python.org Check Python CLA app
    🤖
    @mariatta
    The Bots of CPython

    View Slide

  11. HOW IT WORKS
    7
    PR opened/re-opened
    Check if CLA was
    Apply “CLA Signed” or
    “CLA not signed” label
    👩💻
    Signs CLA
    bugs.python.org
    Checks CLA
    👩💻
    Check Python CLA app
    🤖
    @mariatta
    The Bots of CPython

    View Slide

  12. HOW IT WORKS
    7
    PR opened/re-opened
    Check if CLA was
    Apply “CLA Signed” or
    “CLA not signed” label
    👩💻
    Signs CLA
    bugs.python.org
    Checks CLA
    👩💻
    Update “CLA Signed” label
    Check Python CLA app
    🤖
    @mariatta
    The Bots of CPython

    View Slide

  13. MAKING IT BETTER
    8
    https://github.com/python/core-workflow/issues/360
    Proposed Improvements to CPython’s new CLA Host
    Webhook when the CLA has been signed
    Allow the CLA to be signed on behalf of individual or organization
    Allow the CLA to be signed ahead of time
    b.p.o username should no longer be required
    Mobile-friendly UI
    “Allow-list”-ing
    https://github.com/edgedb/cla-bot
    @mariatta
    The Bots of CPython

    View Slide

  14. Bedevere
    Knows how to identify the witch
    “Nobody expects the Spanish Inquisition!”
    Identifies missing issue number in PR title
    Identifies missing NEWS entry
    Automatically closes invalid PRs
    Labels PR based on type and stages
    9
    https://github.com/python/bedevere
    @mariatta
    The Bots of CPython

    View Slide

  15. CLOSING INVALID PRS
    10
    @mariatta
    The Bots of CPython

    View Slide

  16. CLOSING INVALID PRS
    10
    @mariatta
    The Bots of CPython

    View Slide

  17. CLOSING INVALID PRS
    10
    @mariatta
    The Bots of CPython

    View Slide

  18. CLOSING INVALID PRS
    10
    @mariatta
    The Bots of CPython

    View Slide

  19. APPLYING LABELS
    11
    @mariatta
    The Bots of CPython

    View Slide

  20. HOW IT WORKS
    12
    Webhook event
    Apply label
    Post status
    Close PR
    @mariatta
    The Bots of CPython

    View Slide

  21. HOW IT WORKS
    12
    Webhook event
    Apply label
    Post status
    Close PR
    https://github.com/python/bedevere/issues/344
    Move to GitHub Actions
    @mariatta
    The Bots of CPython

    View Slide

  22. Miss-islington
    a.k.a the witch / miss-skeleton for Halloween
    “I’m not a witch! I’m not a witch!”
    Backports PRs to maintenance branches
    Automerges PRs
    13
    https://github.com/python/miss-islington
    @mariatta
    The Bots of CPython

    View Slide

  23. HOW IT WORKS
    14
    @mariatta
    The Bots of CPython

    View Slide

  24. 🤖 automerge
    15
    🤖 🆗 ✅
    @mariatta
    The Bots of CPython

    View Slide

  25. 🤖 automerge
    15
    🤖 🆗 ✅ 🤖❌
    @mariatta
    The Bots of CPython

    View Slide

  26. MORE INFO
    16
    https://github.com/python/core-workflow
    https://github.com/python/cpython
    https://gidgethub.readthedocs.io
    https://github-app-tutorial.readthedocs.io/
    CPython
    Core-workflow
    Gidgethub
    GitHub App Tutorial
    - The Python Programming Language
    - Python’s Core-workflow
    - Async Python library for working with GitHub APIs
    - Tutorial for building GitHub Apps using gidgethub
    @mariatta
    The Bots of CPython

    View Slide

  27. THANK YOU
    Sponsor on GitHub
    17
    https://github.com/sponsors/Mariatta
    @mariatta
    https://github.com/sponsors/python
    The Bots of CPython

    View Slide

  28. THANK YOU
    Sponsor on GitHub
    17
    https://github.com/sponsors/Mariatta
    @mariatta
    https://github.com/sponsors/python
    The Bots of CPython

    View Slide

  29. 18
    THANK YOU FOR LISTENING!
    ANY QUESTIONS?

    View Slide