Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]: new-plugin CI workflow #2255

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

MattSturgeon
Copy link
Member

Initial conceptual stub for a CI workflow that can announce new plugins.

Pushing this up WIP and unfinished as I find GitHub workflows particularly draining 😅

Hopefully I've stubbed enough out that someone could continue this if I eventually abandon it. 👀

# Default: matrix.org
server: matrix.org
# TODO: token
token: ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be able to have @GaetanLepage set up a repo environment variable for this that we can reference

Copy link
Member Author

@MattSturgeon MattSturgeon Sep 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Generating a token is documented upstream here. I guess we'd want a dedicated "bot" user?

Assuming the repo secret will be named CI_MATRIX_TOKEN for now.

@MattSturgeon
Copy link
Member Author

Barring some testing and cleanup, this should be functionally complete.

I've been testing the python script (used to generate a workflow matrix, and get some other metadata) as follows:

# Test the raw data collection:
$ nix run .#ci-new-plugin-matrix -- github:nix-community/nixvim/336ba155ffcb20902b93873ad84527a833f57dc8 --head 95b322a5220744a5cac725e62fa4e612851edbc2 --raw

# Test the formatted messages produced:
$ nix run .#ci-new-plugin-matrix -- github:nix-community/nixvim/336ba155ffcb20902b93873ad84527a833f57dc8 --head 95b322a5220744a5cac725e62fa4e612851edbc2

Which appears to be working correctly.

I haven't gotten around to testing the CI workflow itself, but I have attempted to extract as much complexity as possible out of the workflow and into the python script.

As far as cleanup is concerned, it'd be nice to:

  • improve the CLI interface
  • comment any confusing code
  • DRY up the github rest api functions

Any early feedback and/or help testing would be greatly appreciated!

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