Changesets
List Changesets - GET
/projects/#{project_id}/changesets.xml
Retrieve a list of changesets for the current project.
Response:
<changesets>
<changeset>
...
</changeset>
<changeset>
...
</changeset>
</changesets>
Get Changeset - GET
/projects/#{project_id}/changesets/#{revision}.xml
This fetches the Changeset.
Response:
<changeset>
<body>#{unprocessed body}</body>
<body-html>#{processed HTML body}</body-html>
<changed-at type="datetime">2007-03-21T21:45:23Z</changed-at>
<changes type="yaml">---
- - M
- /trunk/test/unit/changeset_test.rb
- - M
- /trunk/app/models/changeset.rb
- - M
- /trunk/db/schema.rb
</changes>
<project-id type="integer">2</project-id>
<revision>983</revision>
<title>rick committed changeset [983]</title>
<user-id type="integer">1</user-id>
</changeset>
New Changeset - GET
/projects/#{project_id}/changesets/new.xml
This gives you the initial state for an empty changeset.
Response:
<changeset>
<body></body>
<body-html></body-html>
<changed-at type="datetime"></changed-at>
<changes type="yaml">--- []
</changes>
<project-id type="integer">2</project-id>
<revision></revision>
<title></title>
<user-id type="integer"></user-id>
</changeset>
Create Changeset - POST
/projects/#{project_id}/changesets.xml
Creates a changeset. The shown fields are the only ones you can set:
- body - the body of changeset log message.
- title - Usually something like "#{user} committed changeset #{revision}"
- changed-at - this is the time the actual changeset was committed in your source control tool.
- changesA list of changes, one per line: a letter for the operation and the path to the file.
- revision - this is the unique ID the source control assigns.
- user-id - unused, Lighthouse will use your login or token credentials.
Request:
<changeset>
<body></body>
<body-html></body-html>
<changed-at type="datetime"></changed-at>
<changes>
A /foo/bar.rb
M /foo/bar.rb
</changes>
<revision>1234</revision>
<title>bob committed changeset [1234]</title>
</changeset>
Response:
HTTP Status: 201 Created Location: http://activereload.lighthouseapp.com/projects/5/changesets/5.xml
<changeset>
...
</changeset>
Delete Changeset - DELETE
/projects/#{project_id}/changesets/#{revision}.xml
Response:
HTTP Status: 200 OK