Open
Conversation
Member
Author
|
https://github.com/juspay/services-flake/actions/runs/11004484171/job/30555489649?pr=338 Tested for failure, force pushing now to pass CI |
4635e56 to
785539c
Compare
shivaraj-bh
commented
Sep 24, 2024
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 |
Member
Author
There was a problem hiding this comment.
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.
Member
There was a problem hiding this comment.
$GITHUB_BASE_REF?
785539c to
7992a63
Compare
srid
approved these changes
Sep 24, 2024
| }; | ||
| }; | ||
|
|
||
| # TODO: Move this under `CIApps` once `omnix` supports running them automatically |
Member
Author
There was a problem hiding this comment.
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 |
Member
There was a problem hiding this comment.
$GITHUB_BASE_REF?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

resolves #130