Skip to content

Conversation

@shivaraj-bh
Copy link
Member

@shivaraj-bh shivaraj-bh commented Sep 23, 2024

resolves #130

@shivaraj-bh
Copy link
Member Author

https://github.com/juspay/services-flake/actions/runs/11004484171/job/30555489649?pr=338

image

Tested for failure, force pushing now to pass CI

Comment on lines +45 to +58
default_branch=$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)
# Get the latest commit on the default branch
# rev range using the `default_branch` branch name (e.g. main..HEAD), doesn't work in Github Actions
latest_default_commit=$(git rev-parse origin/"$default_branch")
current_commit=$(git rev-parse HEAD)
if [ "$latest_default_commit" = "$current_commit" ]; then
echo "No commits to check between $default_branch and HEAD."
else
cz check --rev-range "$latest_default_commit"..HEAD
fi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation isn’t generic enough, i.e, it always assumes that the current branch is going to be merged to main, which is okay for now. We can re-think this later if we have a complicated branch tree.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shivaraj-bh shivaraj-bh marked this pull request as ready for review September 24, 2024 10:06
@shivaraj-bh shivaraj-bh requested a review from srid September 24, 2024 10:06
};
};

# TODO: Move this under `CIApps` once `omnix` supports running them automatically
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is CIApps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Custom flake-schema that can be detected by omnix to run everything under it as custom app steps.

Comment on lines +45 to +58
default_branch=$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)
# Get the latest commit on the default branch
# rev range using the `default_branch` branch name (e.g. main..HEAD), doesn't work in Github Actions
latest_default_commit=$(git rev-parse origin/"$default_branch")
current_commit=$(git rev-parse HEAD)
if [ "$latest_default_commit" = "$current_commit" ]; then
echo "No commits to check between $default_branch and HEAD."
else
cz check --rev-range "$latest_default_commit"..HEAD
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Conventional Commits pre-commit check is not working

3 participants