PR template check

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

PR template check

Martin Stefanko
Hi all,

I've created a tool [1] that validates the PR format. For now it checks the title and the description for the required information configured by regex expressions. It runs on my OS online and is configured in [2] on the master branch.

The tool uses GH webhooks which needs to be set up in the targeting repository and it requires the respective OAuth token, for now configured through the OS secret. 

This is the basic functionality, I can add more checks later (e.g., link validity, number of commits). Any feedback is welcome.




Martin Stefanko

Software Engineer
JBoss Sustaining Engineering Team
Red Hat

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: PR template check

Ken Wills-2
On Tue, May 15, 2018 at 4:59 AM Martin Stefanko <[hidden email]> wrote:
Hi all,

Hi Martin,
 

I've created a tool [1] that validates the PR format. For now it checks the title and the description for the required information configured by regex expressions. It runs on my OS online and is configured in [2] on the master branch.

The tool uses GH webhooks which needs to be set up in the targeting repository and it requires the respective OAuth token, for now configured through the OS secret. 

This is the basic functionality, I can add more checks later (e.g., link validity, number of commits). Any feedback is welcome.




This looks like something we could use. What we really, really need is somethign to maintain (add, at least) a whitelist of users that PRs should auto run for & the ability to label a PR with OkToTest or something if the user isn't already in the whitelist.

Is this something you could add to this tool? Does the GH api allow configuration of checks to only run if the previous ones pass?

Thanks,

Ken

 

Martin Stefanko

Software Engineer
JBoss Sustaining Engineering Team
Red Hat
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: PR template check

James Perkins
One thing it would need to if we do something like this is a way to bypass the check. Occasionally a JIRA isn't required for a PR. For example the WildFly Core upgrade in WildFly full we don't generally file a JIRA for.

On Fri, May 18, 2018 at 12:03 PM, Ken Wills <[hidden email]> wrote:
On Tue, May 15, 2018 at 4:59 AM Martin Stefanko <[hidden email]> wrote:
Hi all,

Hi Martin,
 

I've created a tool [1] that validates the PR format. For now it checks the title and the description for the required information configured by regex expressions. It runs on my OS online and is configured in [2] on the master branch.

The tool uses GH webhooks which needs to be set up in the targeting repository and it requires the respective OAuth token, for now configured through the OS secret. 

This is the basic functionality, I can add more checks later (e.g., link validity, number of commits). Any feedback is welcome.




This looks like something we could use. What we really, really need is somethign to maintain (add, at least) a whitelist of users that PRs should auto run for & the ability to label a PR with OkToTest or something if the user isn't already in the whitelist.

Is this something you could add to this tool? Does the GH api allow configuration of checks to only run if the previous ones pass?

Thanks,

Ken

 

Martin Stefanko

Software Engineer
JBoss Sustaining Engineering Team
Red Hat
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev



--
James R. Perkins
JBoss by Red Hat

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: PR template check

Martin Stefanko
In reply to this post by Ken Wills-2
Hi Ken,

This looks like something we could use. What we really, really need is somethign to maintain (add, at least) a whitelist of users that PRs should auto run for & the ability to label a PR with OkToTest or something if the user isn't already in the whitelist.
 
If we decide to move the whitelist setup to this tool (and webhooks) I can extend it to configure the list dynamically possibly through labels or comments (something like /whitelist @user). The same applies to the OkToTest mentions for individual PRs without whitelisting.
 

Is this something you could add to this tool? Does the GH api allow configuration of checks to only run if the previous ones pass?

I am using webhooks that are invoked when the PR is changed in any way. The status checks cannot be removed, otherwise I can update them as needed. 

The tool in the repository is now also checking that the PR should contain only one commit.

Thanks,
Martin Stefanko

Software Engineer
JBoss Sustaining Engineering Team
Red Hat



_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: PR template check

Martin Stefanko
In reply to this post by James Perkins
Hi James,

One thing it would need to if we do something like this is a way to bypass the check. Occasionally a JIRA isn't required for a PR. For example the WildFly Core upgrade in WildFly full we don't generally file a JIRA for.

This is surely doable, but I would argue that this should be clearly stated for instance in the PR title or description (e.g., "[NO JIRA] Subject" or similar). In that way, the check won't be set up.
 
Thanks,
Martin Stefanko

Software Engineer
JBoss Sustaining Engineering Team
Red Hat



_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: PR template check

James Perkins
Hi Martin,
That definitely seems reasonable. Just some way to bypass it. It shouldn't be used often, but it does happen for some small changes.

On Sat, May 19, 2018 at 7:57 AM, Martin Stefanko <[hidden email]> wrote:
Hi James,

One thing it would need to if we do something like this is a way to bypass the check. Occasionally a JIRA isn't required for a PR. For example the WildFly Core upgrade in WildFly full we don't generally file a JIRA for.

This is surely doable, but I would argue that this should be clearly stated for instance in the PR title or description (e.g., "[NO JIRA] Subject" or similar). In that way, the check won't be set up.
 
Thanks,
Martin Stefanko

Software Engineer
JBoss Sustaining Engineering Team
Red Hat





--
James R. Perkins
JBoss by Red Hat

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev