greenkeeperio / greenkeeper-lockfile

:lock: Your lockfile, up to date, all the time
https://greenkeeper.io
183 stars 73 forks source link

Codeship CI Integration #72

Closed selbyk closed 6 years ago

selbyk commented 6 years ago

Implements support for Codeship Pro, updates lockfile on commit messages matching /^(chore|fix)\(package\): update [^ ]+ to version.*$/mi

https://github.com/greenkeeperio/greenkeeper-lockfile/issues/25

StephanBijzitter commented 6 years ago

@janl Since the author is not responding and we also really want this feature:

Codeship does not provide any information that is used by this package on other services to detect the state of the branch. There's only one way to know whether Greenkeeper has already commited on a branch to then update the lockfile and that is by parsing the commit message.

This change does indeed limit Greenkeeper to stick to a specific pattern for commit messages, but that's really the only limitation introduced by this pull request. Even then, if users are (in the future) able to customise these messages, it could simply ignore the customisation on Codeship and stick to the default pattern.

selbyk commented 6 years ago

@janl Sorry for the delayed response, but this has been put on the backburner for the past month or so. I initially tried using the techniques used in the other CI implementations, but gitHelpers.getNumberOfCommitsOnBranch was sporadically returning an incorrect value for some reason. I'm not actually sure what correctBuild should be a switch for, but Codeship doesn't have an environment variable exposed saying wether a build represents a PR, like I see some other implementations doing.

Can you clarify what being usable without semantic-release means? I'd be happy to make adjustments where necessary to get this merged in, but we've been using it in the current state for a couple months now.

janl commented 6 years ago

Thanks for the explanation

Realtin commented 6 years ago

Thank you @selbyk for your work and @StephanBijzitter for the explanation ✨ 🌴

Realtin commented 6 years ago

Oh no! I squashed the commits and now it's all under my name. I'm so sorry 😢

StephanBijzitter commented 6 years ago

@selbyk committed with @Realtin feat: add basic Codeship CI Integration

Looks good to me ;-)