AndyGrant/OpenBench

Warn users when master branch might be out of date

AndyGrant opened this issue · 0 comments

You are working on your feature-branch. You go to create a test, but someone has pushed to master, without your knowledge, and thus you have not rebased. Your test is created, and is bogus because you are testing against the wrong thing.

We should be able to observe that the base branch contains commits not in the dev branch. If this is true, we can warn the user.

We are currently (very crudely) passing error and status messages, via the contents of the request.session object. An example: https://github.com/AndyGrant/OpenBench/blob/master/OpenBench/views.py#L49.

I imagine adding a warning_message to this, and updating the base.html file to display this in yellow text, much like how status and error messages are shown.

ChatGPT generates the following as an initial understanding of the problem: https://chat.openai.com/share/184ff4fa-49c5-40f6-9d6c-0a0b2d13971b