#1082 The API endpoints for the internal API should be localonly
Merged by pingou. Opened by pingou.
fix_local_api  into  master

Download 1082.patch
no initial comment

Are you adding test cases for this?

Otherwise, :thumbsup:

Kinda hard to emulate coming from a different IP in the tests no?

You can mock the flask.request to give a different remote_addr?
But sure, as said the current code looks good enough to me.

You can mock the flask.request to give a different remote_addr?

Gave it a try but it's not straight forward.

Let's merge, thanks for the review! :)

7 new commits added

  • Add unit-tests for the get_branches_of_commit endpoint
  • Rename messages to branches to reflect what is actually in it
  • Raise an error if the commit cannot be found in the repo
  • Add a check that the git repo actually exists and return a 404 otherwise
  • Let's ensure the element we want to use exists and bail otherwise
  • Add on the commit detail page the branch(es) the commit is in
  • Add a private internal API endpoint returning in which branch(es) a commit is

oh, grmbl the new PR is merged into this one, let me re-fix this

1 new commit added

  • The API endpoints for the internal API should be localonly

Pull-Request has been merged by pingou

Pull-Request has been merged by pingou

Metadata