Skip to content

Commit 8bb3951

Browse files
Trotttargos
authored andcommitted
build: remove duplicate check for authors.yml
update-authors.js will print if there are duplicates in the new entries so we can remove the (not working) duplication check in the authors.yml file. It would still be nice to get the information about duplicates into the body of the GitHub PR so no one has to manually check for duplicates (by either examining the file or looking at the Actions output), but that can be a future improvement. PR-URL: #40393 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
1 parent 50f91ab commit 8bb3951

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

.github/workflows/authors.yml

+1-12
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,12 @@ jobs:
1515
with:
1616
fetch-depth: '0' # This is required to actually get all the authors
1717
- run: "tools/update-authors.js" # Run the AUTHORS tool
18-
- name: "Check for duplicates"
19-
run: |
20-
PATTERN_FILE=`mktemp`;
21-
git diff | egrep '^\+[^+]' | perl -pe 's/^\+(.+?) <.+\n/\1\n/g' > $PATTERN_FILE;
22-
DUPLICATES=`grep -F -f $PATTERN_FILE AUTHORS | cut -d'<' -f1 | sort | uniq -c | sort -n | grep -v '^ *1 ' | perl -pe 's/^ *\d+ / /'`; # Last part here substitues a space at the start of each line
23-
echo 'DUPLICATES<<EOF' >> $GITHUB_ENV
24-
if [ ! -z "${DUPLICATES}" ]; then
25-
echo "The following may be duplicates; consider adding a .mailmap entry for them:" >> $GITHUB_ENV;
26-
echo "${DUPLICATES}" >> $GITHUB_ENV;
27-
fi;
28-
echo 'EOF' >> $GITHUB_ENV; # Each line of duplicates starts with a space, so it won't conflict with 'EOF'
2918
- uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR
3019
env:
3120
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
3221
with:
3322
author: Node.js GitHub Bot <[email protected]>
34-
body: "Here are some new additions to the AUTHORS file. This is an automatically generated PR by the `authors.yml` GitHub Action, which runs `tools/update-authors.js`.\n\n{{ env.DUPLICATES }}"
23+
body: "Here are some new additions to the AUTHORS file. This is an automatically generated PR by the `authors.yml` GitHub Action, which runs `tools/update-authors.js`."
3524
branch: "actions/authors-update" # Custom branch *just* for this Action.
3625
commit-message: "meta: update AUTHORS"
3726
labels: meta

0 commit comments

Comments
 (0)