siderolabs / conform

Policy enforcement for your pipelines.
Mozilla Public License 2.0
432 stars 45 forks source link

feat: Create a GitHub bot backed by Conform #113

Closed andrewrynhard closed 5 years ago

andrewrynhard commented 5 years ago

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

ghost commented 5 years ago

Would you be open to using Probot for this?

andrewrynhard commented 5 years ago

@adborns I would! :)

ghost commented 5 years ago

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?

andrewrynhard commented 5 years ago

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

ghost commented 5 years ago

@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?

andrewrynhard commented 5 years ago

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

andrewrynhard commented 5 years ago

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.

andrewrynhard commented 5 years ago

@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?

ghost commented 5 years ago

@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.

andrewrynhard commented 5 years ago

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.

andrewrynhard commented 5 years ago

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

ghost commented 5 years ago

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.

andrewrynhard commented 5 years ago

Sounds good. Thanks!

JensRantil commented 5 years ago

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

andrewrynhard commented 5 years ago

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

andrewrynhard commented 5 years ago

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