Skip to content

Commit cf9ebe7

Browse files
committed
Print commit and branch
1 parent da6cd1f commit cf9ebe7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/o2-linter.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Find issues in O2 code
33
name: O2 linter
44

5-
#"on": [pull_request_target, push]
5+
"on": [pull_request_target, push]
66
permissions: {}
77
env:
88
BRANCH_MAIN: master
@@ -29,6 +29,7 @@ jobs:
2929
fi
3030
echo BRANCH_HEAD="$branch_head" >> "$GITHUB_ENV"
3131
echo BRANCH_BASE="$branch_base" >> "$GITHUB_ENV"
32+
echo "This is the base branch."
3233
- name: Checkout Code
3334
uses: actions/checkout@v6
3435
with:
@@ -37,6 +38,8 @@ jobs:
3738
- name: Run tests
3839
id: linter
3940
run: |
41+
echo "$(git log -n 1 --pretty='format:%ci %h %s %d') $(git rev-parse --abbrev-ref HEAD)"
42+
echo "This is the base branch."
4043
# Diff against the common ancestor of the source (head) branch and the target (base) branch.
4144
echo "Diffing ${{ env.BRANCH_HEAD }} against ${{ env.BRANCH_BASE }}."
4245
readarray -t files < <(git diff --diff-filter d --name-only ${{ env.BRANCH_BASE }}...)

0 commit comments

Comments
 (0)