Skip to content

Commit

Permalink
Merge pull request #1200 from Fryguy/rake_task_sprint_details
Browse files Browse the repository at this point in the history
Add rake task to aid in creating sprint details
  • Loading branch information
jrafanie authored Jan 14, 2025
2 parents 65a6309 + 0f503c4 commit 96e238d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/tasks/sprint_defails.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
desc "Generate a sprint details file for the given sprint number"
task :generate_sprint_details, [:sprint_number] do |_task, args|
# TODO: This is gross, and we need this code in a better location
require_relative "../../../sprint_statistics/sprint_boundary_iterator"

# TODO: There should be a class method on SprintBoundaryIterator that gets you the Sprint by number
number, range = SprintBoundaryIterator.new.detect { |number, _range| number == args[:sprint_number].to_i}

details = {
"title" => "Sprint #{number} Details",
"sprint_number" => number,
"slides" => nil,
"recording" => nil,
"start_date" => range.begin,
"end_date" => range.end,
"review_date" => range.end + 2.days
}
details = details.to_yaml << "---\n"

file = File.join(__dir__, "../../site/_sprints/#{number}.md")
File.write(file, details)
end

0 comments on commit 96e238d

Please sign in to comment.