[generate_puppetfile] Add support for handling commit
[generate_puppetfile] Add support for handling commit

We sometimes [1] need to use a commit hash as a pin,
so adapt the script to work with commit hash pins as well.

[1] https://review.openstack.org/#/c/586946/

Change-Id: I8867b3d41dc6ceef084c6d978cc405b9f6710375

openstack-infra/project-config,openstack-infra/project-config