Skip to content

Commit

Permalink
Fix: invalid logger reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Jul 27, 2023
1 parent 9be3d42 commit 4a6aabc
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 20 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: danger

on: [pull_request]

on: pull_request
jobs:
danger:
name: Dangerfile
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.6.2"
bundler-cache: true
- uses: MeilCli/danger-action@v5
with:
danger_file: "Dangerfile"
danger_id: "danger-pr"
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
# Personal access token for dangerpr-bot - public, but base64 encoded to avoid tripping up GitHub
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
### Changelog

#### 0.2.1 (Next)
#### 0.3.0 (Next)

* [#4](https://github.com/slack-ruby/slack-ruby-bot-server-mailchimp/pull/4): Replaced Travis-CI with GitHub Actions - [@dblock](https://github.com/dblock).
* [#3](https://github.com/slack-ruby/slack-ruby-bot-server-mailchimp/pull/3): Fix: invalid logger reference - [@dblock](https://github.com/dblock).
* Your contribution here.

#### 0.2.0 (2019/4/6)
Expand Down
2 changes: 2 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# frozen_string_literal: true

danger.import_dangerfile(gem: 'slack-ruby-danger')
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,3 @@ group :development, :test do
gem 'vcr'
gem 'webmock'
end

group :test do
gem 'slack-ruby-danger', '~> 0.1.0', require: false
end
6 changes: 6 additions & 0 deletions Gemfile.danger
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

group :test do
gem 'danger-toc', '~> 0.2.0', require: false
gem 'slack-ruby-danger', '~> 0.2.0', require: false
end
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ Slack Ruby Bot Server Mailchimp Extension

A lifecycle extension to [slack-ruby-bot-server](https://github.com/slack-ruby/slack-ruby-bot-server) that subscribes new bot users to a Mailchimp mailing list.

# Table of Contents

- [Usage](#usage)
- [Additional Member Tags](#additional-member-tags)
- [Additional Profile Information](#additional-profile-information)
- [Double Opt-In](#double-opt-in)
- [Copyright & License](#copyright--license)

### Usage

Add 'slack-ruby-bot-server-mailchimp' to Gemfile.
Expand Down
4 changes: 2 additions & 2 deletions lib/slack-ruby-bot-server/mailchimp/lifecycle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
member_tags = member.tags.map { |tag| tag['name'] }.sort
tags = (member_tags + tags).uniq
if tags == member_tags
SlackRubyBot::Client.logger.debug "Skipping #{profile.email} with identical tags (#{tags.join(', ')}), will not be added to #{SlackRubyBotServer::Mailchimp.config.mailchimp_list_id}, #{team}."
SlackRubyBotServer::Service.logger.debug "Skipping #{profile.email} with identical tags (#{tags.join(', ')}), will not be added to #{SlackRubyBotServer::Mailchimp.config.mailchimp_list_id}, #{team}."
next
end
end
Expand All @@ -46,5 +46,5 @@
merge_fields: merge_fields
)

SlackRubyBot::Client.logger.info "Subscribed #{profile.email} to #{SlackRubyBotServer::Mailchimp.config.mailchimp_list_id}, #{team}."
SlackRubyBotServer::Service.logger.info "Subscribed #{profile.email} to #{SlackRubyBotServer::Mailchimp.config.mailchimp_list_id}, #{team}."
end
2 changes: 1 addition & 1 deletion lib/slack-ruby-bot-server/mailchimp/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module SlackRubyBotServer
module Mailchimp
VERSION = '0.2.1'.freeze
VERSION = '0.3.0'.freeze
end
end
2 changes: 1 addition & 1 deletion slack-ruby-bot-server-mailchimp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_dependency 'mailchimp_api_v3'
spec.add_dependency 'slack-ruby-bot-server', '>= 0.10.0'
spec.add_dependency 'slack-ruby-bot-server', '>= 2.0.1'
end

0 comments on commit 4a6aabc

Please sign in to comment.