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(supersetbot): introduce supersetbot as its own npm package, CLI and comment-operated bot #27046

Merged
merged 6 commits into from
Mar 13, 2024

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Feb 8, 2024

SUMMARY

While GitHub actions are powerful, it's been hard to work with actions as they hard to develop, test, and debug.

Introducing a new supsersetbot utility bot that can be used to help around GitHub, CI and beyond. For now it does some basic things like labeling PRs and issues, but the idea is to grow it to serve set of utility functions to help around GitHub, GitHub actions, CI, release management and the repo int general. Things like managing ephemeral environments, supporting release management.

Because it's a proper npm app, it can be tested, versioned, deployed and used locally.

It's a CLI as in:

$ supersetbot
Usage: supersetbot [options] [command]

Options:
  -r, --repo <repo>          The GitHub repo to use (ie: "apache/superset") (default: "mistercrunch/superset")
  -a, --actor <actor>        The actor (default: "bob")
  -h, --help                 display help for command

Commands:
  label [options] <label>    Add a label to an issue or PR
  unlabel [options] <label>  Remove a label from an issue or PR
  orglabel [options]         Add an org label based on the author
  help [command]             display help for command

But it can also be called from GitHub comments, as in:
Screenshot 2024-02-14 at 3 17 15 PM

This means that PR comments can be used a bit more like a terminal, and committers and users can trigger things. Note that it's fully context-aware, nows whether the commenter is a committer, and can decide who should be able to do what.

While this first version brings back the funcitonality we had with a previous, hosted now defunct supersetbot, the vision is to extend it to manage ephemeral envs, tag PRs with release-related information, ...

@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

7 similar comments
@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

@mistercrunch mistercrunch added the hold! On hold label Feb 8, 2024
@mistercrunch
Copy link
Member Author

test

@mistercrunch mistercrunch removed the hold! On hold label Feb 8, 2024
@mistercrunch
Copy link
Member Author

Oh wow, i was really confused, this only triggers if it's on master:
Screenshot 2024-02-07 at 10 28 31 PM

@geido
Copy link
Member

geido commented Feb 9, 2024

@supersetbot label preset-io

1 similar comment
@mistercrunch
Copy link
Member Author

@supersetbot label preset-io

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

This is awesome, #TIL

.github/workflows/supersetbot.yml Outdated Show resolved Hide resolved
.github/workflows/supersetbot.yml Outdated Show resolved Hide resolved
.github/workflows/supersetbot.yml Outdated Show resolved Hide resolved
@github-actions github-actions bot added github_actions Pull requests that update GitHub Actions code preset-io and removed preset-io labels Feb 9, 2024
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Only one change request... this seems like it'd cause some potential release/security issue, if I'm not mistaken and anyone can remove any tag. We should probably have some means to protect important tags (or namespaces thereof) like release numbers that Cherry Tree uses, or hold tags, for example.

@mistercrunch mistercrunch changed the title feat(supersetbot): re-implement labeling bot as a GitHub action feat(supersetbot): introduce supersetbot as its own npm package, CLI and comment-operated bot Feb 14, 2024
@mistercrunch mistercrunch force-pushed the supersetbot branch 3 times, most recently from 7834771 to 4aa6149 Compare February 20, 2024 19:54
@mistercrunch mistercrunch force-pushed the supersetbot branch 2 times, most recently from 1970e29 to 3d9d752 Compare February 28, 2024 01:41
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM — I think the last thing it needs (which could be done separately) is adding some documentation. Either a page on the docs site, or maybe a page on the wiki. The description on the PR here is a great starting point — a tweaked version of that would suffice to raise initial awareness.

@mistercrunch mistercrunch merged commit 24cb062 into master Mar 13, 2024
21 checks passed
@mistercrunch mistercrunch deleted the supersetbot branch March 13, 2024 23:26
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
EandrewJones pushed a commit to UMD-ARLIS/superset that referenced this pull request Apr 5, 2024
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code preset-io size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants