Update Danger setup to run via Buildkite + Add RuboCop linter#627
Update Danger setup to run via Buildkite + Add RuboCop linter#627
Conversation
Generated by 🚫 Danger |
|
|
||
| - group: "Linters" | ||
| steps: | ||
| - label: ☢️ Danger - PR Check |
There was a problem hiding this comment.
I updated the branch requirements to use this name.
As a follow up, I shall open a new PR implementing the custom GitHub commit status names.
| cancel-running-github-jobs: false | ||
| secrets: | ||
| github-token: ${{ secrets.DANGERMATTIC_GITHUB_TOKEN }} | ||
| buildkite-api-token: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }} |
There was a problem hiding this comment.
Notice that this workflow didn't kick in for this PR, as you can see by the fact that the Dangermattic comment still mentions the PR being a draft. But that's because for it to run it needs to land on trunk.
There was a problem hiding this comment.
🎗️ To add TRIGGER_BK_BUILD_TOKEN to the GHA secrets in this repo.
iangmaia
left a comment
There was a problem hiding this comment.
Approving to unblock, but left a couple of improvements / suggestions.
.github/workflows/run-danger.yml
Outdated
| on: | ||
| pull_request: | ||
| types: [opened, reopened, ready_for_review, synchronize, edited, review_requested, review_request_removed, labeled, unlabeled, milestoned, demilestoned] | ||
| types: [labeled, unlabeled, milestoned, demilestoned] |
There was a problem hiding this comment.
By the way, just remembered that given we now don't trigger Buildkite when a PR moves to ready for review, it probably makes sense to also add the ready_for_review event as well.
Co-authored-by: Ian G. Maia <iangmaia@users.noreply.github.com>
Co-authored-by: Ian G. Maia <iangmaia@users.noreply.github.com>

What does it do?
In #410, Danger failed to run because of an issue installing native extensions. This made @iangmaia and I realize that Dangermattic in this repo was not set up with the modern Buildkite configuration, but still run on GitHub Actions.
This PR updates the Danger step up.
I used WordPress at
d7cc886at the template.While I was at it, I also added a CI step to run the RuboCop linter.
Checklist before requesting a review
bundle exec rubocopto test for code style violations and recommendations. — N.A.specs/*_spec.rb) if applicable. — N.A.bundle exec rspecto run the whole test suite and ensure all your tests pass. — N.A.CHANGELOG.mdfile to describe your changes under the appropriate existing###subsection of the existing## Trunksection. — N.A.MIGRATION.mdfile to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider. — N.A.