Application folders have been restructured as well as files properly named to suit their usage.
Improvements
The initialize_repo function starts by creating the base folder where repositories containing the policy files will be stored. It then proceeds to check if a local repo path is present:
If this folder is present, the next set of operations are ignored to prevent overwriting the current files and folder.
If the folder isn't present, the GitHub repo supplied to the function is cloned to the assigned path /tmp/fastgeoapi.
The git_push function has been updated to take two arguments: the repository path as well as the path to the .git folder to reduce the inline manipulation of file path in the function body.
To use this API, these are the steps you should follow:
Create a .env file containing the following parameters:
The GITHUB_URL is the repo containing ( or will contain ) the policy files.
At the moment, the auth.rego file which is created is stored in the base folder of the repository. Once the API is working properly and the persistence issue has been solved by @r-scheele, I will make provisions to store the policy files in a policy directory.
Run the application from the entrypoint:
$ python main.py
The interactive documentation page located at http://localhost:8000/docs can be used to play with requests and verify the GitHub automation implemented.
Breaking Changes
None.
Comments
If you encounter any issue using this API or have a suggestion, please file an issue and it will be attended to.
Major change
Application folders have been restructured as well as files properly named to suit their usage.
Improvements
The
initialize_repo
function starts by creating the base folder where repositories containing the policy files will be stored. It then proceeds to check if a local repo path is present:/tmp/fastgeoapi
.The
git_push
function has been updated to take two arguments: the repository path as well as the path to the.git
folder to reduce the inline manipulation of file path in the function body.To use this API, these are the steps you should follow:
.env
file containing the following parameters:The
GITHUB_URL
is the repo containing ( or will contain ) the policy files.The interactive documentation page located at http://localhost:8000/docs can be used to play with requests and verify the GitHub automation implemented.
Breaking Changes
None.
Comments
If you encounter any issue using this API or have a suggestion, please file an issue and it will be attended to.