-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rultor: Check maintainership before merging
This adds 1 environment variable: export GITHUB_TOKEN=... Currently @adtac's Github token is used. Please note that the used token must have admin rights to the coala organization.
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Do not use `set -x` here as then it displays the PYPIPW in logs | ||
set -e | ||
|
||
# Get environment variables, readily decrypted by rultor | ||
source ../rultor_secrets.sh | ||
|
||
# Make sure the user is a maintainer | ||
if curl "https://api.github.com/teams/1238757/memberships/${author}?access_token=${GITHUB_TOKEN}" | grep -q "Not Found"; then | ||
echo "@${author} is not in the maintainers group." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
merge: | ||
fast-forward: only | ||
script: echo "Nothing to do." | ||
script: | ||
- bash .ci/check_maintainership.sh | ||
|
||
decrypt: | ||
rultor_secrets.sh: "repo/.ci/rultor_secrets.sh.asc" |