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

feat(rulesets): add script #19

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

sgoudham
Copy link
Contributor

@sgoudham sgoudham commented Sep 6, 2024

This PR adds a deno script (main.ts) that will be responsible for modifying rulesets at scale across the organisation.

TODO:

  • Implement all CRUD actions (currently only reads/lists the rulesets)
  • Implement some sort of dry-run behaviour (effectively AWS CF Changesets)
    where we can see what it's going to do before it does it (can be cut from the
    scope of the PR if it proves too difficult/tedious to implement)
  • A nicer CLI interface
  • Add an exception list of repositories that we don't want to apply certain rules to.
  • Update documentation

It's worth noting that at some point in the future, I'd hope to see scripts
like this get converted into Golang as part of catppuccin/cli as the CLI
should be as useful to the leadership team as it should be for "normal" users.
I can dream...

Comment on lines +7 to +12
if (Deno.args.length < 1) {
console.error(
"Please provide your GitHub personal access token as an argument."
);
Deno.exit(1);
}
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be read via https://docs.deno.com/runtime/manual/basics/env_variables/ instead of as an arg. This is how it is done in userstyles Octokit stuff as well FYI.

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