Answers: <p>One method to test the contents of the git commit message is a mix of <code>contains</code> and <code>github.event.head_commit.message</code></p>
  <pre><code>contains(github.event.head_commit.message, '#BUILD')
  </code></pre>
  <p>Also reported that <a href="https://github.com/github/gh-actions-importer/discussions/60#discussion-4923960" rel="nofollow noreferrer"><code>github.event.head_commit.message</code> is only available on push events</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2024-12-23T19:08:14.080Z
Answers: 2024-12-23T20:26:12.927Z
Answers: 2024-12-23T20:26:12.927Z
Answers: Evan Carroll
Body: <p>GitLab provides a lot &quot;predefined-variables&quot; which contain useful stuff prepopulated to help you write rules. Two examples of that are</p>
  <ul>
  <li><code>CI_COMMIT_DESCRIPTION</code> The description of the commit. If the title is shorter than 100 characters, the message without the first line.</li>
  <li><code>CI_COMMIT_MESSAGE</code> The full commit message.</li>
  </ul>
  
Tags: <github-actions>
Title: What is the GitHub eqivolent of GitLab's CI_COMMIT_MESSAGE?
UserDisplayName: Evan Carroll
ThreadText: # What is the GitHub eqivolent of GitLab's CI_COMMIT_MESSAGE?
  
  (Asked by: username_0 on 2024-12-23)
  
  GitLab provides a lot "predefined-variables" which contain useful stuff prepopulated to help you write rules. Two examples of that are
  
  * `CI_COMMIT_DESCRIPTION` The description of the commit. If the title is shorter than 100 characters, the message without the first line.
  * `CI_COMMIT_MESSAGE` The full commit message.
  
  **Tags:** github-actions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-12-23. Score: 0
  
  One method to test the contents of the git commit message is a mix of `contains` and `github.event.head_commit.message`
  
  ```
  contains(github.event.head_commit.message, '#BUILD')
  
  ```
  
  Also reported that [`github.event.head_commit.message` is only available on push events](https://github.com/github/gh-actions-importer/discussions/60#discussion-4923960)
  
  
  ---
  
  