File tree 2 files changed +11
-3
lines changed 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ trello:
45
45
token : [YOUR API TOKEN]
46
46
` ` `
47
47
48
+ You also need to set the environment variable ` TRELLO_BOARD_ID` (e.g. `Yae2dtTq`).
49
+
48
50
# ## Configure Google Sign In
49
51
50
52
You need to configure the app with Google creds.
Original file line number Diff line number Diff line change 1
1
namespace :trello do
2
- WHOS_WHO = "Xau2Ttaq"
3
-
4
2
desc "Looks for Trello cards that have been archived (closed) and discards the person in the database"
5
3
task clean : :environment do
6
4
Rails . logger = Logger . new ( STDOUT )
@@ -22,7 +20,10 @@ namespace :trello do
22
20
Rails . logger = Logger . new ( STDOUT )
23
21
Rails . logger . info "Loading cards from Trello"
24
22
25
- lists = Trello ::Board . find ( WHOS_WHO ) . lists
23
+ board = ENV [ 'TRELLO_BOARD_ID' ]
24
+ raise "Missing environment variable TRELLO_BOARD_ID" if board . nil?
25
+
26
+ lists = Trello ::Board . find ( board ) . lists
26
27
lists . each do |list |
27
28
Rails . logger . info "Checking #{ list . name } "
28
29
@@ -33,6 +34,11 @@ namespace :trello do
33
34
34
35
Rails . logger . info "checking #{ card . name } "
35
36
37
+ if person . updated_at > card . last_activity_date
38
+ Rails . logger . info "No activity. Skipping"
39
+ next
40
+ end
41
+
36
42
name , title = card . name . split /[\[ (]/
37
43
person . name = name . strip if name
38
44
person . title = title . gsub ( /[\) \] ]/ , "" ) . strip if title
You can’t perform that action at this time.
0 commit comments