Skip to content

ci(ci-test): add the logic to the the dir when y do push or pr - #5

Merged
z4root merged 1 commit into
mainfrom
fix/ci-logic
Oct 21, 2026
Merged

z4root merged 1 commit into
mainfrom
fix/ci-logic

Conversation

@z4root

@z4root z4root commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Adding the logic to know if its a pr use git diff and its a push use a diff-tree, with that you compared the package that just enter.
if [ "${{ github.event_name }}" == "pull_request" ]; then change_folder=$(git diff --name-only origin/main...HEAD | grep "Git/exercises" | head -n 1 | cut -d/ -f1-3) else change_folder=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "Git/exercises" | head -n 1 | cut -d/ -f1-3) fi

@z4root
z4root merged commit 31b4a0b into main Oct 21, 2026
7 checks passed
@z4root
z4root deleted the fix/ci-logic branch October 21, 2026 05:03
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.

1 participant