SensioLabsInsight needs to access your source code in order to analyze the quality of your projects. Depending on your project configuration, the code can be obtained via pull mode or push mode.
The pull mode is used when SensioLabsInsight gets your code automatically from a Git repository hosted elsewhere (e.g. in GitHub), no matter if the repository is public or private. The push mode is used when you set up a private Git repository on SensioLabs and you explicitly push the code before each analysis.
The push mode is the easiest way to analyze private projects without giving SensioLabsInsight access to your repository.
Follow these steps to analyze a project using the push mode:
1 Access to your private SensioLabsInsight dashboard and click on the
Add project link located at the top of the right sidebar.
2 Click on the
Other SCM tab and choose the name of your project.
3 Click on the
Create repository button and SensioLabsInsight will
now create a private Git repository hosted by SensioLabs where you can push your
If your project is already using Git to manage its code, add a new remote to start pushing your code right away:
$ git remote add sensiolabs firstname.lastname@example.org:<your-username>/<your-project>.git $ git push sensiolabs master
From now on, whenever you want to run a new analysis, don't forget to push your
code first to the
If your project doesn't use Git to manage its code, install Git on your own machine and then, execute the following commands to initialize your Git project and to push the source code to SensioLabsInsight:
1 2 3 4 5 6 7 8 9 10 11
$ mkdir myproject/ $ cd myproject/ $ git init # copy the source code of your project on this new directory: # cp -r /your/project/files/ myproject/ $ git add . $ git commit -m "Added initial set of files" $ git remote add sensiolabs email@example.com:<your-username>/<your-project>.git $ git push sensiolabs master
For subsequent analysis, copy again the files that have changed and push the code before running the analysis:
1 2 3 4
$ cd myproject/ $ git add . $ git commit "Updated project files" $ git push sensiolabs master