Skip to content

Commit

Permalink
ci: add logs regarding the pr context
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdichtioui committed Nov 29, 2024
1 parent 730b268 commit fefd4c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
18 changes: 15 additions & 3 deletions build/stage-commit-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@
jobs:
- job: OnWindows_ValidateCommits
pool:
vmImage : $(windowsHostedAgentImage)
vmImage : 'ubuntu-latest'
variables:
System.Debug: true # Enable detailed logs for this job only
steps:
- checkout: self
fetchDepth: 0

fetchDepth: 0 # Fetch all commit history
persistCredentials: true # Allow additional Git cmds
ref: $(System.PullRequest.SourceBranch) # Fetch PR source branch

- script: |
echo "Current branch: $(Build.SourceBranch)"
echo "Git branches:"
git branch -a
echo "Latest commit details:"
git log -& --pretty=format: '%h %s'
displayName: 'Debug Git state'
- template: templates/validate-commits.yaml
1 change: 1 addition & 0 deletions build/templates/validate-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ steps:
regExFlags: "um"
allCommitsMustMatch: true
prMode: true
checkPullRequestCommits: false # Validate commits in the PR context
displayName: 'Validate Commit Messages'

0 comments on commit fefd4c9

Please sign in to comment.