-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable interval for GH API #8
Comments
We refactored hukum for our in-company Self-hosted Bitbucket Server, in case we add 3 major changes:
Thanks for a such great idea and it's really a productivity tool, hope this will helps~ If needed, we can contribute the implementations to original hukum repo. |
It's good to hear that the tool was helpful. Thanks! I'm interested to hear more about the third item on the list. Could you describe it ? |
The third item aims to distinguish the type of current ref. Which majority can be treated as BRANCH and TAG(detached commit).
const parseRef = (latestLog) => {
const refInfo = (latestLog || '').split(', ')
const headState = refInfo[0].split(' -> ')
/** Normal head pointer for branch */
if (headState.length > 1) {
return {
ref: headState[1],
refType: 'branch'
}
}
/** Detached head pointer for tags */
if (refInfo.length > 2) {
const tagState = (refInfo[1] || '').split(': ')
return {
ref: tagState[1] || '',
refType: 'tag'
}
}
/** stub fallback */
return {
ref: null,
refType: null
}
} and we only need to make a slight refactor to our /** unrelated codes omitted */
const log = await git.log()
// here
const { ref, refType } = parseRef(log.latest.refs) p.s. Of course it helps! The importance of the tool is that it can treat as a "local workflow pipeline item". Thanks for hukum, we finally connects local development and remote delivery altogether. For examples: # open published site after delivery process finished
hukum && open $PROJECT_PUB_URL
# pull for tag updates after delivery for npm-type packages
hukum && git pull `git symbolic-ref --short -q HEAD`
# of course we have the full version of pushing and pulling
git push `git symbolic-ref --short -q HEAD` && hukum && git pull `git symbolic-ref --short -q HEAD`
# after publish npm package, we can update in main repo and then trigger main repo's CD process
git push `git symbolic-ref --short -q HEAD` && hukum && git pull `git symbolic-ref --short -q HEAD` && cd $MAIN_PROJECT_SRC && yarn add $PRODUCT_PACKAGE && yarn pkg:version
# And endless possibilities |
This is great, thanks for the details. |
Hukum should allow to configure the interval at which the GH APIs are called.
The text was updated successfully, but these errors were encountered: