| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 50f91ab commit 8bb3951
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,23 +15,12 @@ jobs: | |||
| 15 | 15 | with: | |
| 16 | 16 | fetch-depth: '0' # This is required to actually get all the authors | |
| 17 | 17 | - 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' | ||
| 29 | 18 | - uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR | |
| 30 | 19 | env: | |
| 31 | 20 | GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} | |
| 32 | 21 | with: | |
| 33 | 22 | author: Node.js GitHub Bot <github-bot@iojs.org> | |
| 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`." | ||
| 35 | 24 | branch: "actions/authors-update" # Custom branch *just* for this Action. | |
| 36 | 25 | commit-message: "meta: update AUTHORS" | |
| 37 | 26 | labels: meta | |
| Back | FazBrowse Home | New Git URL |
0 commit comments