Author Archives:
Hubot with Git Submodules
Git: upstream is gone
Your branch is based on 'origin/master', but the upstream is gone. (use "git branch --unset-upstream" to fixup)
I was delivering a workshop at the time so I kinda snarled at it and carried on with what I was doing, but later I looked up what is happening. This occurs when a branch is tracking a branch that the git repo doesn’t have any information about – the branches to be tracked aren’t in the local repo metadata.
In my case, it happened because I had created and then cloned an empty repo for training purposes – so origin/master
didn’t actually exist yet! I added a quick commit-and-push to my script and hope that I won’t be upstaged by this change that came in with git 1.8.5.
Hopefully this post will help someone else to avoid being upstaged or irritated by this as well!
5 Reasons to Consider Upgrading Your PHP Platform
ZCE Preparation Pack
I’ve been running a preparation course for the Zend Certified Engineer exam for many years now. Once upon a time it was possible to buy a pack of sample exams and I used them myself when preparing for certification and also recommended them for all my students. Unfortunately this resource became unavailable and so I created a sample exam to use with my own course …. and then (after some nagging!) made it generally available.
I’ve now relaunched the pack on a new platform (for boring regulatory reasons); its new home is on Leanpub which is a fantastic platform for authors, offering markdown authoring, github integration, and many other awesome features. Perhaps more importantly, it also offers great features for readers: a 45-day money back guarantee and automatic updates to any book you have bought.
If you’re thinking of improving your skills by studying for ZCE or considering upgrading your certification to the current version (PHP 5.5), this pack will help you to prepare. It includes:
– Advice on what to expect on the day
– One exam’s worth (70) of questions in the style of the ZCE
– Answers with explanations, worked examples, and resources for further study
Help yourself get ready for ZCE: https://leanpub.com/zce
Gollum the Git-Enabled Wiki
– must handle words and documents
– should be available locally, bonus points for revision history
– must publish to the web, and ideally be editable there
– should accept content in markdown
– must have access control (which wiped out my original plan of using a static site generator)
While I worked on this, we were using the wiki feature in GitLab … which pretty much hit the nail on the head. Further investigation showed that the wiki feature in GitLab (and indeed in GitHub) is a ruby gem called Gollum. Continue reading
Set Up Your First Hubot
Continue reading
My Leanpub Toolchain
Hubot and Slack
- Hubot will not respond to you in PM, you need to join a channel and then
/invite @hubot
and your bot will join you in that channel and then respond when you address him/her by name - When configuring channel names for slack (I use the gitlab plugin which needs a GITLAB_CHANNEL environment variable), do NOT include a
#
at the start of it if you use slack – works a treat in IRC, but skip it for slack. I spent quite a while looking for a bug in the slack adapter before I figured this one out so it’s written here for me to look up next time! - Also note that your hubot can only speak in channels that it has joined; I have seen hubot actually crash when asked to speak in a channel that exists but which isn’t known to it.
I think this central way of having plugins which can integrate with many messaging platforms on one side, and integrate with many external APIs on the other means we’ll be doing much more in chat ops moving forward. Already I’m impressed by how many of the hosted tools I use have webhooks, although there aren’t hubot plugins for all of them (yet!).