Programming

hey web devs need some advice.

I got saddled with a project marked with high urgency. Basically what the higher ups want is a commit search feature for bitbucket like github has. Like they want to see all commits by a user in this date range, across all of our repositories.

I’m using the bitbucket rest API to handle this, I already mocked out all the requests I need to make. I’m writing a server in python flask in the middle to service requests from the front end GUI, which will send a request to authentication and bitbucket server, and spit back the results to the GUI.

The middle server is mostly solved in my head, that’s no big deal. However I’ve never designed or programmed a front end other than a shitty e-commerce site I made for a project in one of my classes in school, and that was using PHP and vanilla JS.

My question is, if I want to get this up and running by the end of next week, and all the GUI has to really do is take some log in information (securely), have some text fields for search parameters, and display results in a way that isn’t horrifically ugly, what framework is best for me?

Don’t do it. They’re going to start monitoring commits as a dev performance metric, devs will figure it out, and you’ll get a ton of crap code changes for no reason.

Yea but I’m just a few weeks here and just glad I have an important project.

You’re right, they want to see dev activity while we are remote. Which may be for a while. So this is actually a really important project to them and I want to do it competently.

The only way you can do metrics like that is never ever let the devs know about it. And really just use the as a sanity check. If they’re tasking you to build something - everyone will know about it and start checking in random crap every day. Ugh.

We used to use stash - the self-hosted version of bitbucket and it does have this built in. I’m surprised it doesn’t exist on bitbucket.com.

lol

I guess if I had no front end knowledge just output html table tags in flask and hope for the best right.

Go with a heavier framework like Django that has all that stuff built in?

I’m just gonna probably end up pulling someone from another team to do the final version - but I need a demo to show by next week.

Flask using templates.

Handspring using backflip.js.

(I just made those up but they’re probably also real.)

1 Like

Whatever you use just make sure to call the program CLOC.

jmakin - have you looked at this?

https://docs.stiltsoft.com/display/public/AwesomeGraphsBitbucket/Awesome+Graphs+for+Bitbucket

We are using a server hosted at bitbucket.org - I don’t know if we have the capability to put addons in. The lazy part of me kind of assumed this problem had already been solved and wants to go to something like that, but the ambitious and bored part of me really wants something to do of value.

My first two weeks I just created some pointless onboarding documentation (none really existed before) as if I could somehow bootstrap my own onboarding. I did it but lol.

The addon specifically says it works with bitbucket-cloud. You should investigate before building something.

Did some digging, won’t work for more than 100 repos. We have like 600.

Ah.

That led me to another huge uh oh though - due to rate limiting at 1000/hour, I don’t think the requirements for this are feasible. Gotta break the news.

1000 what an hour?

Requests to the bitbucket server. I need to query 600+ repositories individually. I already suspected this would be way too slow but now i have something concrete to take to my lead and the manager

It doesn’t need to be real time - you could run it in the background all day then store the stats somewhere. Probably the only way to do it anyway.

Also can the query be smart enough to either grab every user for a repo, or every repo for a user, or all repos for all users?

Yea that was my backup plan, I have a few others. It’s just gonna delay things. My lead is super annoying - every time i tried to go down these paths, he’d poo poo it and say “you’re thinking too big, think smaller and focus”