Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rake task to aid in creating sprint details #1200

Merged
merged 1 commit into from
Jan 14, 2025
Merged
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
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
Loading