Reputation: 335
Is there a way to make a Git repository behave like a REST endpoint such that I can change the code hosted on GitHub to change based on a PUT request?
Example:
In the repository below I want some external REST end point URL to change the value from http://localhost:8080/app/
to some new value like http://example.com
using a POST action.
https://github.com/TechieTester/gatling-
fundamentals/blob/master/src/gatling/scala/baseConfig/BaseSimulation.scala
I need to change the code I have on GitHub using a REST endpoint POST action.
Upvotes: 2
Views: 313
Reputation: 732
No, there is not a way to make your Git repository on GitHub act as a REST API endpoint. This would be using GitHub pages and that does not allow server-side code. Per their documentation:
GitHub Pages is a static site hosting service and doesn't support server-side code such as, PHP, Ruby, or Python.
You can setup a REST API that makes updates to your GitHub repository. An example project to look at is Staticman comments engine for static sites: https://github.com/eduardoboucas/staticman
Upvotes: 1