Skip to content

Commit

Permalink
Change mods-actions' display logic (forem#630)
Browse files Browse the repository at this point in the history
* Add username to deploy-track

* Change mod-actions' show logic

* Remove comment
  • Loading branch information
maestromac authored and benhalpern committed Jul 27, 2018
1 parent 749d61a commit 9e19593
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion after_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 9e19593

Please sign in to comment.