Hi
I have a team wanting a new project in Bitbucket but with a couple of restraints put in place around the creation repositories and the initial commit into these. I've tried having a look online but have been unable to determine if these are at all possible so hoping someone on the community can either suggest a solution or simple advise its not possible.
Here are what they're wanting to have put in place:
1. At least two people to "approve" the creation of repositories and somehow incorporate this into an existing ticket.
--- I've thought about possibly creating these via script and execute this on a JIRA transition (with approval conditions wrapped around this in JIRA) but what I'm stuck on it the multiple approvals part - We have something similar with a single approver in JIRA but not multiple. Also never done repo creation via cmd line but appears simple enough - may have to do it via generic account or something.
2. When a new repository is created in Bitbucket the initial/first commit doesn't appear to require a review so the problem this team has is they want every commit including this one to be reviewed.
--- Is this even possible?
Thank you all in advance for any advice or suggestions you might have.
Jamie
With enough talent, time and budget, everything is possible. ;-)
1. Personally, I'd build off Bitbucket Server's own dual-approval system instead of doing anything in JIRA. Create a special "repo-of-repos" and have your script read from that before it creates new repositories. Use the Bitbucket Server "default approvers" and "minimum approvals" features to implement the dual-approval part.
2. You are correct that requiring a pull-request against the first commit is awkward. I'm not sure how possible implementing such is, and how difficult it might be. But I can think of a cheap workaround: have your script push an initial empty commit against 'master' whenever a new repository is created:
git commit --allow-empty -m 'initial empty commit'
git push
p.s. My own company maintains the free Control Freak add-on. We'd be willing to add a special "First Commit Must Be Empty" rule to our add-on if you think that might be helpful.
Thanks G. Sylvie
I hadn't considered your suggestion for point 1 so will definitely look into it since it sounds much simpler.
As soon as I posted this my developer (who requested these requirements) also came to me with with that initial commit workaround and in fact they use this already (nice of them to inform me in advance) so can easily incorporate this into a script.
I will also check out that plugin and adding that rule could be useful.
Regards, Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.