this post was submitted on 25 Jul 2023
12 points (92.9% liked)

Programming

16971 readers
172 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

Anyone have suggestions for getting some tools in place to monitor for when changes happen that match certain criteria (obvious one being when certain files change)? Hosting-wise, we use BitBucket Cloud, though I can't find anything built-in that'd be useful (seems like most cloud-based solutions don't offer pre-receive hook customisation?)

We've had some "issues" with people not considering the impact of changes to certain code, and just want a little more handholding before the next time that sort of issue happens. I'm sure I could rig something either with a webhookey endpoint, or a CI build that does it, but it just seems like the sort of thing there'd be a pre-built tool for.

Any ideas?

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 1 year ago

On GitHub i might've reached for a codeowners file for the specific files you're talking about. Then you'd be automatically added to pull request reviews. But not sure if that what you're asking.

[–] [email protected] 4 points 1 year ago

If you are using BitBucket Cloud you can create pr rules to include people into Review based on files change. And then you can create a user for a bot to monitor those PRs using standard BB notification emails. Of course if there is not much PRs bot is Overkill and human will be enough.

You can always "just" create a static script that pulls repo check diff for files and email people if something is found. This way you don't link your solution to the git cloud offering.

[–] [email protected] 2 points 1 year ago

You can make a CI run for when certain path filters are hit.

Make this CI run mandatory to be passing for the merge to pass. You can see when this CI is run that "special people" need to check the PR also

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

As you only mention git and not any git hosting. I would say you could easily use git hooks. Fir you and probably ask everyone in your team to install the same git hooks to have a chance to review changes before they are commited.

For my team there is an init-git-repo.sh shell script in our repository. When you execute it, it will install all the git-hooks fir your local repository.

You can use them to add checks during commit, merge, etc…

Edit: I read a bit too fast. As you are using bitbucket there id probably the equivalent of github’s CODEOWNER file as already proposed in another comment.

load more comments
view more: next ›