Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/danger-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Danger Comment

on:
workflow_run:
workflows: [Danger]
types: [completed]

permissions:
actions: read
issues: write
pull-requests: write

jobs:
comment:
uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.1.0
secrets: inherit
26 changes: 9 additions & 17 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
name: PR Linter
on: [pull_request]
name: Danger
on:
pull_request:
types: [opened, reopened, edited, synchronize]
jobs:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.1
- run: |
# the personal token is public, this is ok, base64 encode to avoid tripping Github
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose

uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v0.1.0
secrets: inherit
with:
ruby-version: "3.4"
danger-args: "dry_run --base=origin/master"
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### 0.7.0 (Next)

* [#49](https://github.com/dblock/open-weather-ruby-client/pull/49): Migrate Danger to use the `danger-pr-comment` reusable workflow - [@dblock](https://github.com/dblock), [@Copilot](https://github.com/apps/copilot-swe-agent).
* [#49](https://github.com/dblock/open-weather-ruby-client/pull/49): Upgrade danger-changelog to 0.8.0 and danger-toc to 0.2.0 - [@dblock](https://github.com/dblock), [@Copilot](https://github.com/apps/copilot-swe-agent).
* Your contribution here.
* [#46](https://github.com/dblock/open-weather-ruby-client/pull/46): Added support for the five day forecast API - [@mgm702](https://github.com/mgm702).

Expand Down
6 changes: 4 additions & 2 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# frozen_string_literal: true

toc.check
changelog.check
danger.import_dangerfile(gem: 'danger-pr-comment')

toc.check!
changelog.check!
5 changes: 3 additions & 2 deletions open-weather-ruby-client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ Gem::Specification.new do |s|
s.add_dependency 'faraday-multipart'
s.add_dependency 'hashie'

s.add_development_dependency 'danger-changelog', '~> 0.4.2'
s.add_development_dependency 'danger-toc', '~> 0.1.3'
s.add_development_dependency 'danger-changelog', '~> 0.8.0'
s.add_development_dependency 'danger-pr-comment'
s.add_development_dependency 'danger-toc', '~> 0.2.0'
s.add_development_dependency 'dotenv'
s.add_development_dependency 'pry'
s.add_development_dependency 'rake'
Expand Down
Loading