Skip to content

Commit

Permalink
[Tooling] Run Danger on Buildkite Linter Agent (#1686)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio authored Aug 30, 2024
2 parents e860c48 + bde14a0 commit 8f39a7c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ steps:
command: ./gradlew --stacktrace testRelease
plugins: *common_plugins

- label: "☢️ Danger - PR Check"
command: danger
key: danger
if: "build.pull_request.id != null"
retry:
manual:
permit_on_passed: true
agents:
queue: "linter"

- label: "🔬 Lint"
command: ./gradlew --stacktrace lintRelease
plugins: *common_plugins
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/run-danger.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: ☢️ Danger
name: ☢️ Trigger Danger On Buildkite

on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize, edited, labeled, unlabeled, milestoned, demilestoned]
types: [labeled, unlabeled, milestoned, demilestoned, ready_for_review]

jobs:
dangermattic:
# runs on draft PRs only for opened / synchronize events
if: ${{ (github.event.pull_request.draft == false) || (github.event.pull_request.draft == true && contains(fromJSON('["opened", "synchronize"]'), github.event.action)) }}
uses: Automattic/dangermattic/.github/workflows/[email protected]
if: ${{ (github.event.pull_request.draft == false) }}
uses: Automattic/dangermattic/.github/workflows/[email protected]
with:
org-slug: "automattic"
pipeline-slug: "simplenote-android"
retry-step-key: "danger"
build-commit-sha: "${{ github.event.pull_request.head.sha }}"
secrets:
github-token: ${{ secrets.DANGERMATTIC_GITHUB_TOKEN }}
buildkite-api-token: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }}
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ GEM
options (2.3.2)
optparse (0.5.0)
os (1.1.4)
parallel (1.26.2)
parallel (1.26.3)
parser (3.3.4.2)
ast (~> 2.4.1)
racc
Expand All @@ -274,7 +274,7 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.5)
rexml (3.3.6)
strscan
rouge (2.0.7)
rubocop (1.65.1)
Expand All @@ -288,7 +288,7 @@ GEM
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.0)
rubocop-ast (1.32.1)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
Expand Down

0 comments on commit 8f39a7c

Please sign in to comment.