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

chore(build): add LOGFROM flag to check-pr rule #3348

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ PS: DO NOT JUMP THE CHECKLIST. GO BACK AND READ, ALWAYS!

### 1. Explain what the PR does

<!-- Best advice is to put copy & paste your very well written git logs -->
<!-- Best advice is to put copy & paste "make check-pr" PR Comment output -->

"Replace me with `make check-pr` output"

### 2. Explain how to test it

Expand Down
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,8 @@ check-err: \
# pull request verifier
#

LOGFROM ?= main

.PHONY: check-pr
check-pr: \
check-fmt check-lint check-code \
Expand All @@ -868,9 +870,14 @@ check-pr: \
@echo

@$(CMD_GIT) \
log main..HEAD \
--pretty=format:'%C(auto,yellow)%h%Creset **%C(auto,red)%s%Creset** _<sub>%C(auto,cyan)(%ad)%Creset %C(auto,green)%an \<%ae\>%Creset</sub>_%n%n```%n%b```%n' \
--date=format:"%Y/%b/%d"
log $(LOGFROM)..HEAD \
--pretty=format:'%C(auto,yellow)%h%Creset **%C(auto,red)%s%Creset**'

@echo

@$(CMD_GIT) \
log $(LOGFROM)..HEAD \
--pretty=format:'commit %C(auto,yellow)%h%Creset%n%n```%n%b```%n'

@echo
@echo "*** PR Comment END"
Expand Down