Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 20, 2018. It is now read-only.

Commit df5eb7b

Browse files
committed
Post on wunderlist note
1 parent b618b4a commit df5eb7b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎rake/weekly.rake‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,10 @@ def say_thanks_and_close_issue(weekly_date)
184184
contributors.each_key do |key|
185185
contributors_list << "@#{key}"
186186
end
187+
url = weekly_url(weekly_date)
187188
comment = <<-EOS
188189
:fireworks:Congratulations!
189-
:scroll:MSBU Weekly #{weekly_date} is published on <https://msbu-tech.github.io/weekly/#{weekly_date}-weekly.html>.
190+
:scroll:MSBU Weekly #{weekly_date} is published on <#{url}>.
190191
:thumbsup:Thanks #{contributors_list.join ', '} for your great contributions!
191192
EOS
192193
# say thanks
@@ -210,7 +211,7 @@ Post your entry following the instruction of <https://github.com/msbu-tech/weekl
210211
show_success
211212
end
212213

213-
def find_issue_link()
214+
def find_issue_link
214215
client = Octokit::Client.new(:access_token => get_access_token)
215216
# find issue
216217
issues = client.list_issues(get_weekly_repo, options = {:state => "open"})
@@ -222,15 +223,21 @@ def find_issue_link()
222223
"https://github.com/#{get_weekly_repo}/issues/#{number}"
223224
end
224225

226+
def weekly_url(weekly_date)
227+
"https://msbu-tech.github.io/weekly/#{weekly_date}-weekly.html"
228+
end
229+
225230
def complete_wunderlist(weekly_date)
226231
wl = Wunderlist::API.new({
227232
access_token: ENV["WLIST_ACCESS_TOKEN"],
228233
client_id: ENV["WLIST_CLIENT_ID"]
229234
})
230235

231236
tasks = wl.tasks(["🗑Working"])
237+
url = weekly_url(weekly_date)
232238
tasks.each do |t|
233239
if t.title.eql?("MSBU Tech Weekly") && weekly_date.eql?(t.due_date)
240+
t.note.content = "MSBU Weekly #{weekly_date} is published on <#{url}>."
234241
t.completed = true
235242
t.save
236243
show_info("Completing wunderlist task...")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /