NiklasRosenstein / flux-ci

Flux is your own private & lightweight CI server.
MIT License
26 stars 10 forks source link

Implement the functionality for starting new build. #38

Closed tvrzna closed 6 years ago

tvrzna commented 6 years ago

Hello, I'm not going to lie, I couldn't help myself and had to dig into #35. I was thinking all the time about somekind database structure upgrade for adding flag, but since I'm not much into Python, I've decided to make it by described and proposed way.

First step is obviously checking, that commit_sha is "0" * 32 and ref is defined. Second step is checkout by defined ref. Third and fourth steps are getting current sha and real ref. The reason for 4th step is fact, that user can insert ref just "develop" and it could be annoying to have many build with "refs/heads/..." and then just "develop". And that's it.

I've also added Enter/Escape listening into input text, because it add more natural feeling and moved Start Build as first item of dropdown - it will be used more times than edit or delete.

tvrzna commented 6 years ago

Added new commit, that fixes using commit sha as build ref to prevent setting empty ref.

NiklasRosenstein commented 6 years ago

Thanks for the PR. :-)