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

[.github] - refactor: mention workflow author in slack #8967

Merged
merged 3 commits into from
Nov 27, 2024
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
21 changes: 7 additions & 14 deletions .github/actions/slack-notify/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,20 @@ outputs:
runs:
using: "composite"
steps:
- name: Get author email
- name: Get author info
if: inputs.step == 'start'
id: author
shell: bash
run: |
# Get last commit author name and email
AUTHOR_NAME=$(git log -1 --format='%an')
AUTHOR_EMAIL=$(git log -1 --format='%ae')
AUTHOR_NAME="${{ github.actor }}"

if ! CANONICAL=$(git check-mailmap "$AUTHOR_NAME <$AUTHOR_EMAIL>" 2>/dev/null); then
echo "email=$AUTHOR_EMAIL" >> $GITHUB_OUTPUT
echo "name=$AUTHOR_NAME" >> $GITHUB_OUTPUT
exit 0
if ! EMAIL=$(git check-mailmap "$AUTHOR_NAME" 2>/dev/null); then
echo "GitHub handle $AUTHOR_NAME not found in mailmap" >&2
exit 1
fi

# Extract email and name from canonical form
CANONICAL_EMAIL=$(echo "$CANONICAL" | grep -o '<.*>' | tr -d '<>')
CANONICAL_NAME=$(echo "$CANONICAL" | sed 's/ <.*>//')

echo "email=$CANONICAL_EMAIL" >> $GITHUB_OUTPUT
echo "name=$CANONICAL_NAME" >> $GITHUB_OUTPUT
echo "email=$EMAIL" >> $GITHUB_OUTPUT
echo "name=$AUTHOR_NAME" >> $GITHUB_OUTPUT

- name: Lookup by email
if: inputs.step == 'start'
Expand Down
50 changes: 15 additions & 35 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -1,35 +1,15 @@
Alban Dumouilla <[email protected]>
Alban Dumouilla <[email protected]> <[email protected]>
Alexandre Pinot <[email protected]>
Alexandre Pinot <[email protected]> <[email protected]>
Aubin Tchoi <[email protected]>
Aubin Tchoi <[email protected]> <[email protected]>
Aubin Tchoi <[email protected]> <[email protected]>
Daphné Popin <[email protected]>
Daphné Popin <[email protected]> <[email protected]>
Daphné Popin <[email protected]> <[email protected]>
Edouard Wautier <[email protected]>
Edouard Wautier <[email protected]> <[email protected]>
Flavien David <[email protected]>
Flavien David <[email protected]> <[email protected]>
Gabriel Hubert <[email protected]>
Gabriel Hubert <[email protected]> <[email protected]>
Henry Fontanier <[email protected]>
Henry Fontanier <[email protected]> <[email protected]>
Jules Belveze <[email protected]>
Jules Belveze <[email protected]> <[email protected]>
Jules Belveze <[email protected]> <[email protected]>
Lucas Massemin <[email protected]>
Lucas Massemin <[email protected]> <[email protected]>
Pauline Pham <[email protected]>
Pauline Pham <[email protected]> <[email protected]>
Philippe Rolet <[email protected]>
Philippe Rolet <[email protected]> <[email protected]>
Sebastien Flory <[email protected]>
Sebastien Flory <[email protected]> <[email protected]>
Stanislas Polu <[email protected]>
Stanislas Polu <[email protected]> <[email protected]>
Thibault Martin <[email protected]>
Thibault Martin <[email protected]> <[email protected]>
Thomas Draier <[email protected]>
Thomas Draier <[email protected]> <[email protected]>
JulesBelveze [email protected]
pinotalexandre [email protected]
aubin-tchoi [email protected]
PopDaph [email protected]
Duncid [email protected]
flavien [email protected]
gabriel [email protected]
henry [email protected]
lucasmassemin [email protected]
Yutcam [email protected]
philipperolet [email protected]
sflory [email protected]
spolu [email protected]
thib-martin [email protected]
thomas [email protected]