siderolabs/conform

feat: Create a GitHub bot backed by Conform

andrewrynhard opened this issue · 16 comments

It would be nice if a bot could alert users on what policies need to be addressed and mention them in a PR.

Would you be open to using Probot for this?

@adborns I would! :)

Great! I'm going try help on this then, starting by reading through the Probot documentation. Seems to me like this bot should be its own repo dependent on conform. Do you agree? If so, would you like to create a new repo for it under your autonomy org and for me to fork?

Awesome! Agree, it should be in a separate repo: https://github.com/autonomy/conform-bot. Appreciate it!

@andrewrynhard, I've made some progress on the conform-bot fork. Everything is set up for actual development now. To be sure I understand your intent, are you wanting the output of conform enforce to appear as a comment from the bot in a pull request?

i Was thinking we maybe tie it to the status of the PR. Any opinions on this?

I’m mobile otherwise I’d pull up what they call it in GH but there is a way to make it a dtatus check that people can tick as required.

@adborns Thanks again for working on this. Wanted to say, if you need any modifications to conform, I can make them. Would a JSON output format help at all?

@andrewrynhard you are right. A status change would be better than a single comment for many reasons, such as to ensure the policies are truly enforced before a merge.

Is "checks" the GitHub term you were looking for? If so, I can look into what is involved in creating one to better answer about JSON output. My guess would be "probably" especially if conform currently equipped with only console output?

On a personal note, some of this is new territory for me so there is a discovery process involved. Regardless, hopefully you find value being added to conform through what we accomplish on this issue. I found your project acknowledged in the documentation from Conventional Commits and saw this as a way to get involved.

I appreciate the time and effort! Glad to get help from the community on it. I hope you find it useful.

It looks like "checks" is indeed what I was thinking. Currently it is console output only, but I can work on getting you JSON output.

Hey @adborns Just wanted to check in on the progress here, and if you were still up for taking this on? Thanks!

Hi @andrewrynhard. Not too much progress lately, but still something I'm hoping to get back to. Last thing I did was subscribe the bot to listen for checks, but there is no code yet for handling the check events.

Sounds good. Thanks!

Crazy idea: This might also be possible to be implemented using https://github.com/features/actions. AFAIK, will avoid having to run infrastructure.

@JensRantil I actually think that is a great idea. 🤔 I might have to give this a shot soon.

@ghost @JensRantil I took The GitHub actions route in #128. Closing this.