diff --git a/after_deploy.sh b/after_deploy.sh index 68b376f409cda..e673467cb331d 100644 --- a/after_deploy.sh +++ b/after_deploy.sh @@ -2,4 +2,9 @@ REPOSITORY=https://github.com/thepracticaldev/dev.to_private/ REVISION="$(git rev-parse HEAD)" -curl -X POST -H "Content-Type: application/json" -d '{"environment":"production","repository":"'${REPOSITORY}'","revision":"'${REVISION}'"}' "https://airbrake.io/api/v4/projects/${AIRBRAKE_PROJECT_ID}/deploys?key=${AIRBRAKE_PROJECT_KEY}" +COMMIT_AUTHOR=$(git --no-pager log -1 --pretty=format:'%an') +PAYLOAD='{ "environment":"production", "repository":"'${REPOSITORY}'", "revision":"'${REVISION}'", "username":"'${COMMIT_AUTHOR}'"}' +curl -X POST \ + -H "Content-Type: application/json" \ + -d "${PAYLOAD}" \ + "https://airbrake.io/api/v4/projects/${AIRBRAKE_PROJECT_ID}/deploys?key=${AIRBRAKE_PROJECT_KEY}" diff --git a/app/assets/javascripts/initializers/initializeBaseUserData.js b/app/assets/javascripts/initializers/initializeBaseUserData.js index 86c610e33aeba..b42dffad642c7 100644 --- a/app/assets/javascripts/initializers/initializeBaseUserData.js +++ b/app/assets/javascripts/initializers/initializeBaseUserData.js @@ -49,7 +49,7 @@ function addRelevantButtonsToArticle(user) { } } var commentsContainer = document.getElementById('comments-container'); - if (commentsContainer) { + if (commentsContainer && user.trusted) { var modButts = document.getElementsByClassName('mod-actions'); for (var i = 0; i < modButts.length; i++) { var butt = modButts[i];