DevSecOps automations in Bitbucket | ScriptRunner for Bitbucket

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии • 3

  • @versusbattle5916
    @versusbattle5916 2 года назад +1

    In ScriptRunner, I can't create any custom script to check commit message with certain conditions like, let's say starts with xyz-1234, can i ?

    • @AdaptavistEnterprise
      @AdaptavistEnterprise  2 года назад

      Hi there, Thanks for reaching out. The short answer to this is - You can. Here's a link from our library containing the script you are looking for. You will need to edit it to check for the particular pattern you are interested in: library.adaptavist.com/entity/prevent-push-if-commit-message-does-not-match-pattern
      At the same time, we also have this script that has a much more comprehensive validation check: library.adaptavist.com/entity/custom-bitbucket-commit-message-validation
      I hope you find both useful. If you still need to get in touch with our customer support team, please use this link: productsupport.adaptavist.com/servicedesk/customer/portal/3
      Best,
      Debbie

    • @versusbattle5916
      @versusbattle5916 2 года назад

      @@AdaptavistEnterprise hi
      Thank you :)
      That is a perfect script, in our company, we have paid version,
      So i can see, 4 sections under Scriptarunner
      pre hook, post hook, merge checks & listeners
      Which one of above am i supposed to use in order to get this script running?
      I tried prehook --> reject merge commits
      But it's giving me multiple errors like,
      You tried to call a method which is not allowed to ,
      CommitCallback = new PreRepositoryHookCommitCallBacks()
      And so on...