Run script when creating gitlab commit
I'm using gitlab, I want to get the current commit text on commit in my workflow script.
My code:
exports.rule = entity.Issue.onChange({
title: 'vcs-change',
action: function(ctx) {
// Run only commit gitlab
}
});
I want this code to run when the user makes a commit and get the current commit text
I thought this code is run when the user makes a commit
exports.rule = entities.VcsChange = (function(){
// Run when commit even
});
but not working
Please sign in to leave a comment.
Thank you for contacting YouTrack community forums. To trigger on adding a new commit, you can use something like `return ctx.issue.vcsChanges.added.isNotEmpty();` in the guard section. Each vcsChange object has a `text` property (https://www.jetbrains.com/help/youtrack/devportal/v1-VcsChange.html#properties) that you can access to get the commit message.
Please let me know if it helps.