Skip to content

Commit

Permalink
Update CI configs to v0.5.4
Browse files Browse the repository at this point in the history
Update lint scripts and CI configs.
  • Loading branch information
pionbot authored and Sean-Der committed Jun 14, 2023
1 parent 6e39a73 commit d8a4cf0
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 38 deletions.
29 changes: 17 additions & 12 deletions .github/assert-contributors.sh → .github/generate-authors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
set -e

SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
AUTHORS_PATH="$GITHUB_WORKSPACE/AUTHORS.txt"

if [ -f ${SCRIPT_PATH}/.ci.conf ]
then
Expand All @@ -21,18 +22,18 @@ fi
#
# DO NOT EDIT THIS
#
EXCLUDED_CONTRIBUTORS+=('John R. Bradley' 'renovate[bot]' 'Renovate Bot' 'Pion Bot')
EXCLUDED_CONTRIBUTORS+=('John R. Bradley' 'renovate[bot]' 'Renovate Bot' 'Pion Bot' 'pionbot')
# If you want to exclude a name from all repositories, send a PR to
# https://github.com/pion/.goassets instead of this repository.
# If you want to exclude a name only from this repository,
# add EXCLUDED_CONTRIBUTORS=('name') to .github/.ci.conf

MISSING_CONTRIBUTORS=()
CONTRIBUTORS=()

shouldBeIncluded () {
for i in "${EXCLUDED_CONTRIBUTORS[@]}"
do
if [ "$i" == "$1" ] ; then
if [[ $1 =~ "$i" ]]; then
return 1
fi
done
Expand All @@ -41,21 +42,25 @@ shouldBeIncluded () {


IFS=$'\n' #Only split on newline
for contributor in $(git log --format='%aN' | sort -u)
for contributor in $(git log --format='%aN <%aE>' | LC_ALL=C.UTF-8 sort -uf)
do
if shouldBeIncluded $contributor; then
if ! grep -q "$contributor" "$SCRIPT_PATH/../README.md"; then
MISSING_CONTRIBUTORS+=("$contributor")
fi
CONTRIBUTORS+=("$contributor")
fi
done
unset IFS

if [ ${#MISSING_CONTRIBUTORS[@]} -ne 0 ]; then
echo "Please add the following contributors to the README"
for i in "${MISSING_CONTRIBUTORS[@]}"
if [ ${#CONTRIBUTORS[@]} -ne 0 ]; then
cat >$AUTHORS_PATH <<-'EOH'
# Thank you to everyone that made Pion possible. If you are interested in contributing
# we would love to have you https://github.com/pion/webrtc/wiki/Contributing
#
# This file is auto generated, using git to list all individuals contributors.
# see `.github/generate-authors.sh` for the scripting
EOH
for i in "${CONTRIBUTORS[@]}"
do
echo "$i"
echo "$i" >> $AUTHORS_PATH
done
exit 1
exit 0
fi
2 changes: 1 addition & 1 deletion .github/hooks/pre-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

set -e

.github/assert-contributors.sh
.github/generate-authors.sh

exit 0
48 changes: 48 additions & 0 deletions .github/workflows/generate-authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: generate-authors

on:
pull_request:

jobs:
generate-authors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ secrets.PIONBOT_PRIVATE_KEY }}

- name: Generate the authors file
run: .github/generate-authors.sh

- name: Add the authors file to git
run: git add AUTHORS.txt

- name: Get last commit message
id: last-commit-message
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
COMMIT_MSG="${COMMIT_MSG//'%'/'%25'}"
COMMIT_MSG="${COMMIT_MSG//$'\n'/'%0A'}"
COMMIT_MSG="${COMMIT_MSG//$'\r'/'%0D'}"
echo "::set-output name=msg::$COMMIT_MSG"
- name: Get last commit author
id: last-commit-author
run: |
echo "::set-output name=msg::$(git log -1 --pretty='%aN <%ae>')"
- name: Check if AUTHORS.txt file has changed
id: git-status-output
run: |
echo "::set-output name=msg::$(git status -s | wc -l)"
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ steps.git-status-output.outputs.msg != '0' }}
with:
commit_message: ${{ steps.last-commit-message.outputs.msg }}
commit_author: ${{ steps.last-commit-author.outputs.msg }}
commit_options: '--amend --no-edit'
push_options: '--force'
skip_fetch: true
3 changes: 0 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
- name: File names
run: .github/lint-filename.sh

- name: Contributors
run: .github/assert-contributors.sh

- name: Functions
run: .github/lint-disallowed-functions-in-library.sh

Expand Down
30 changes: 30 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Thank you to everyone that made Pion possible. If you are interested in contributing
# we would love to have you https://github.com/pion/webrtc/wiki/Contributing
#
# This file is auto generated, using git to list all individuals contributors.
# see `.github/generate-authors.sh` for the scripting
adwpc <[email protected]>
aler9 <[email protected]>
Antoine Baché <[email protected]>
Atsushi Watanabe <[email protected]>
Bao Nguyen <[email protected]>
debiandebiandebian <[email protected]>
ffmiyo <[email protected]>
Guilherme <[email protected]>
Haiyang Wang <[email protected]>
Hugo Arregui <[email protected]>
John Bradley <[email protected]>
Juliusz Chroboczek <[email protected]>
Kazuyuki Honda <[email protected]>
Luke Curley <[email protected]>
lxb <[email protected]>
Michael MacDonald <[email protected]>
Michael MacDonald <[email protected]>
Raphael Derosso Pereira <[email protected]>
Rob Lofthouse <[email protected]>
Robin Raymond <[email protected]>
Sean DuBois <[email protected]>
Sean DuBois <[email protected]>
Simone Gotti <[email protected]>
Tarrence van As <[email protected]>
Woodrow Douglass <[email protected]>
22 changes: 0 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,5 @@ If you need commercial support or don't want to use public methods you can conta
### Contributing
Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:

* [John Bradley](https://github.com/kc5nra) - *Original Author*
* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
* [Woodrow Douglass](https://github.com/wdouglass) *RTCP, RTP improvements, G.722 support, Bugfixes*
* [Michael MacDonald](https://github.com/mjmac)
* [Luke Curley](https://github.com/kixelated) *Performance*
* [Antoine Baché](https://github.com/Antonito) *Fixed crashes*
* [Hugo Arregui](https://github.com/hugoArregui)
* [Raphael Derosso Pereira](https://github.com/raphaelpereira)
* [Atsushi Watanabe](https://github.com/at-wat)
* [adwpc](https://github.com/adwpc) *add transport-cc extension*
* [Bao Nguyen](https://github.com/sysbot) *add VP9 noop, bug fixes.
* [Tarrence van As](https://github.com/tarrencev) *add audio level extension*
* [Simone Gotti](https://github.com/sgotti)
* [Guilherme Souza](https://github.com/gqgs)
* [Rob Lofthouse](https://github.com/roblofthouse)
* [Kazuyuki Honda](https://github.com/hakobera)
* [Haiyang Wang](https://github.com/ocean2811)
* [lxb](https://github.com/lxb531)
* [Robin Raymond](https://github.com/robin-raymond)
* [debiandebiandebian](https://github.com/debiandebiandebian)
* [Juliusz Chroboczek](https://github.com/jech)

### License
MIT License - see [LICENSE](LICENSE) for full text

0 comments on commit d8a4cf0

Please sign in to comment.