This PR fixes #25 adding latest command.
You can either pass it the environment you want to retrieve the latest deployment from or not:
/deploy latest REPO:
I wasn't sure about which would be the desired behaviour on this case, so proposing this:
If the repository have a default environment, it will return the latest deployment for that environment.
If the repository doesn't have a default environment, it will return the latest deployment for the whole repository, no matter which environment.
/deploy latest REPO to ENVIRONMENT:
Returns the latest deployment for a concrete environment.
Added a few specs also. One of them is commented because seems like the behaviour on the fake github client is not the same as on Octokit client, you can check the comments on the specs.
This PR fixes #25 adding
latest
command. You can either pass it the environment you want to retrieve the latest deployment from or not:/deploy latest REPO
: I wasn't sure about which would be the desired behaviour on this case, so proposing this:/deploy latest REPO to ENVIRONMENT
: Returns the latest deployment for a concrete environment.Added a few specs also. One of them is commented because seems like the behaviour on the fake github client is not the same as on Octokit client, you can check the comments on the specs.