Skip to content

SAT: display git commit hash after running SAT #4534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sherifnada opened this issue Jul 4, 2021 · 1 comment
Closed

SAT: display git commit hash after running SAT #4534

sherifnada opened this issue Jul 4, 2021 · 1 comment

Comments

@sherifnada
Copy link
Contributor

sherifnada commented Jul 4, 2021

Tell us about the problem you're trying to solve

Sometimes we want to accept a contributor's PR before necessarily being able to run CI ourselves (e.g: if we are still standing up the sandbox environment). To do this, we ask them to provide evidence of SAT succeeding locally.

Describe the solution you’d like

I want to display the hash of the HEAD commit after running SAT successfully. This should not break if there is no currently available Git commit/running outside of a git repository.

Implementation advice

It seems we can use def pytest_sessionstart() placed in conftest.py in SAT's root directory to display the Git Hash. We can probably also use something else like a contextmanager yield style statement (see SO link at beginning of sentence). IDK if that's the recommended way now in Python.

@sherifnada
Copy link
Contributor Author

closed in #11497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants