Skip to content
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

Feature/ci workflow #19

Merged
merged 6 commits into from
May 8, 2024
Merged

Feature/ci workflow #19

merged 6 commits into from
May 8, 2024

Conversation

AGiljanovic
Copy link
Collaborator

Note that this will be trggered on all branches and check the conformation to the previously agreed conventions and styles.

Setup and Test Job:
* Node.js Environment
* Dependency Management - yarn without altering the lockfile (--frozen-lockfile)
* Linting the code
* Build and Test: this might be a bit redundant because we kind of already have a test CI
* Sec test with audit

Commit Message Validation + Branch Name Validation

@AGiljanovic
Copy link
Collaborator Author

AGiljanovic commented May 7, 2024

Added better merge commit handling.

- name: Validate Commit Messages
  run: |
    commit_messages=$(git log --format=%B origin/main..HEAD)
    echo "Checking commit messages: $commit_messages"
    IFS=$'\n'
    for message in $commit_messages; do
      # Checks if the commit message starts with 'Merge'
      if [[ "$message" =~ ^Merge ]]; then
        echo "Skipping merge commit: $message"
      elif ! echo "$message" | grep -Pq '^(ADD:|FIX:|DEL:|UPD:) .+'; then
        echo "Invalid commit message: '$message'"
        echo "Commit messages must start with ADD:, FIX:, DEL., or UPD: followed by a space and text."
        exit 1
      fi
    done
    echo "All commit messages adhere to the specified format."

@alkaline-0 alkaline-0 merged commit 0793e9a into main May 8, 2024
12 checks passed
@NewerKey NewerKey deleted the feature/ci-workflow branch January 20, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants