-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
EIP Linting Bot #3351
EIP Linting Bot #3351
Conversation
I can review this more in-depth, but I don't think the actual code should live in this repo. I think you should create a repository to house this code and only install it in the CI here to use. |
Yeah was thinking the same thing @lightclient but @MicahZoltu recommended letting it live here just for the sake of simplicity |
The way GitHub actions work, I actually think it ends up much simpler if we have the code live in this repository. Otherwise we would need a whole CI system for publishing the compiled/packaged GitHub action and then referencing it as a third party package. |
|
okay will remove |
🤔 actually, to @lightclient's point, since this is TypeScript and GitHub actions only execute typescript, I think we still need a build process/CI to compile TS to JS? Is it possible to run TS directly in GitHub actions? |
ncc takes care of this; dist/index.js is a pure js compile version that runs in actions |
I bet we can use |
@MicahZoltu Okay, I can do that. But another option could just be to do a simple action example implementation of this: p.s. I implemented below as well |
Sadly, if it hard fails it'll block CI. Fun fact, I actually cannot merge this PR because the bot is failing against this branch. 😬 |
Co-authored-by: Micah Zoltu <[email protected]>
@MicahZoltu I have defaulted the action to pass on error, so despite it failing it won't cause problems. the only behavior that will be prevented from failing behavior is the merging of a given PR. I haven't been able to implement a solid work around yet, but I'm certain that some exist. One example would be to just remove the secret whenever you want it to fail / be manual. Then when you want to run it, add a secret, click on the task on a given PR, and then re-run. |
I believe only repository owners have the ability to change secrets, and the repository owners are not the editors. 😢 Does this help us at all? It sounds like exactly what we want, but maybe I'm missing something. https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow Also, I think we can make it so this particular GitHub action doesn't block merge on failure by adjusting the repository settings. I believe only @MadeofTin can do that though. Project page > Settings > Branches > Add Rule > Require status checks to pass before merging > deselect this github action. |
Assuming @MadeofTin can make the above change, I think the best solution would be to disable the auto-merge feature, but enable errors. It will then auto-run on every PR and we can watch to see when it would have merged and when it would have not merged based on its success/failure status. Once we are comfortable it would be acting in the right times, we can then enable the auto-merge behavior. Separately, assuming we can get manually run workflows setup, we could have a different workflow that does the same thing but does auto-merge which can be run manually. That way we can use it via manual trigger when the current bot is broken, which gives us another vector to test-in-production with it. |
@MicahZoltu sounds good. I'll work on getting that all setup. Also is feasible to just have two workflows / secrets where one has the ability to merge and the other does not Thanks for the link that should be easy to implement |
version 1.1.0 of the EIP bot has the ability to merge commented out |
v1.1.1 also throws and error if anything except a merge occurs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long on reviewing this, been super busy lately.
@Souptacular I suspect we will need some changes to this repository when this is merged such as changing whether this status check is a required one or not:
Specifically, we would like to have this not block merging into master
initially so we (editors) can monitor its behavior/output for a bit to make sure it all looks reasonable.
We may want to coordinate merging this to a time when all 3 of us are online so we can make sure we don't have downtime for the repository if it goes south. Alternatively, you can be replaced by anyone else with admin access to this repository.
Co-authored-by: Micah Zoltu <[email protected]>
Happy to coordinate. Best way to do this is to make a private group (maybe Discord?) with parties that are necessary and who will be monitoring. I can make you admin temporarily as well, but will try to be available as much as possible to help. |
* EIP Linting Bot * Delete .DS_Store * Delete .DS_Store * Delete .DS_Store * remove build * gitignore dist * add npm install && npm run build * fix script * prettier run * Handful of minor cleanups, fixes, and tweaks. * Update .github/bot/action.yml Co-authored-by: Micah Zoltu <[email protected]> * Update .github/bot/tsconfig.json Co-authored-by: Micah Zoltu <[email protected]> * Update .github/bot/package.json Co-authored-by: Micah Zoltu <[email protected]> * move to dev and cleanup packages * update readme * make versions explicit * Revert "Update .github/bot/tsconfig.json" This reverts commit 4a702c8. * Update .github/bot/tsconfig.json Co-authored-by: Micah Zoltu <[email protected]> * update to node 14 * target ES2015 because github * remove log * compile at action run-time using github composites * use GITHUB-TOKEN instead * auto_merge_bot * collapse action into one line * update to node 14 bc of composite action * basic tests setup * absolute paths plus fixing jest and ts configs * revert absolute build out debug system * fixing absolute paths 🙏 * use repo * edit * edit * remove bot because in it's own repo now * Update eip-1051.md * fix issue with cd'ing into the action * revert accidental change * Update .github/workflows/auto-merge-bot.yml Co-authored-by: Micah Zoltu <[email protected]> * continue on error * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update eip-1015.md * Update eip-1015.md * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update .github/workflows/auto-merge-bot.yml Co-authored-by: Micah Zoltu <[email protected]> Co-authored-by: Micah Zoltu <[email protected]>
* EIP Linting Bot * Delete .DS_Store * Delete .DS_Store * Delete .DS_Store * remove build * gitignore dist * add npm install && npm run build * fix script * prettier run * Handful of minor cleanups, fixes, and tweaks. * Update .github/bot/action.yml Co-authored-by: Micah Zoltu <[email protected]> * Update .github/bot/tsconfig.json Co-authored-by: Micah Zoltu <[email protected]> * Update .github/bot/package.json Co-authored-by: Micah Zoltu <[email protected]> * move to dev and cleanup packages * update readme * make versions explicit * Revert "Update .github/bot/tsconfig.json" This reverts commit 4a702c8. * Update .github/bot/tsconfig.json Co-authored-by: Micah Zoltu <[email protected]> * update to node 14 * target ES2015 because github * remove log * compile at action run-time using github composites * use GITHUB-TOKEN instead * auto_merge_bot * collapse action into one line * update to node 14 bc of composite action * basic tests setup * absolute paths plus fixing jest and ts configs * revert absolute build out debug system * fixing absolute paths 🙏 * use repo * edit * edit * remove bot because in it's own repo now * Update eip-1051.md * fix issue with cd'ing into the action * revert accidental change * Update .github/workflows/auto-merge-bot.yml Co-authored-by: Micah Zoltu <[email protected]> * continue on error * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update eip-1015.md * Update eip-1015.md * Update auto-merge-bot.yml * Update auto-merge-bot.yml * Update .github/workflows/auto-merge-bot.yml Co-authored-by: Micah Zoltu <[email protected]> Co-authored-by: Micah Zoltu <[email protected]>
Github actions eip linting bot
In this process I converted the other python bot to typescript, added documentation, and I (mostly) untangled the originally nested logic.
next steps:
For now, though, the code achieves the goal of linting PRs and is able to be expanded much more easily