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 for publishing a sprint to the website #1203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Feb 7, 2025

This expands on the previous rake task to give full instructions on publishing a sprint.

@jrafanie Please review. I used this code to generate #1202

This is what it looks like when run:

$ be rake publish_sprint[254]
Follow these manual steps to prepare for publishing the Sprint:

Upload the recording to YouTube:
1. Download the cover slide of the Sprint Google Slide deck via
   File -> Download -> PNG image (.png, current slide)
2. Set the Title to "Sprint 254"
3. Set the Thumbnail to the cover slide downloaded in Step 1
4. Set the Playlist to "Sprint Reviews"
5. Click Next until the Visibility tab, then set Save or Publish to "Public"
6. Click Publish
7. Copy the Video Link

Enter the recording link: https://youtu.be/_e4H63cOWPg

Upload the slide deck to SlideShare:
1. Download the full Sprint Google Slide deck via
   File -> Download -> Microsoft PowerPoint (.pptx)
2. Click Upload and choose the slide deck downloaded in Step 1
3. Set the Title to "ManageIQ - Sprint 254 Review - Slide Deck"
4. Set the Description to "ManageIQ Sprint 254"
5. Set the Category to "Software"
6. Click Publish
7. Copy the URL

Enter the slides link: https://www.slideshare.net/slideshow/manageiq-sprint-254-review-slide-deck/275457740

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL typo in the file name 😛

@Fryguy
Copy link
Member Author

Fryguy commented Feb 7, 2025

I did try automating the upload to YouTube, and it was such a huge pain in the neck to even get the auth correct that I just gave up.

If someone were so inclined they could automate that part, and it should be pretty easy to slot in right where the text is more or less.

@Fryguy
Copy link
Member Author

Fryguy commented Feb 7, 2025

FWIW, this is as far I as I got with YouTube, but it like only works sometimes 🤷

require "bundler/inline"

gemfile do
  source "https://rubygems.org"
  gem "yt", "~> 0.32"
end
require "uri"
require "net/http"
require "json"

Yt.configure do |config|
  config.client_id = ENV["YT_CLIENT_ID"]
  config.client_secret = ENV["YT_CLIENT_SECRET"]
end

puts "Click the following link to login to YouTube with the desired account:"
puts Yt::Account.new(:scopes => %w[youtube], :redirect_uri => "https://www.manageiq.org").authentication_url
puts
puts "Once you've logged in, copy the URL from your browser and paste it here:"
redirect_uri = URI.parse(STDIN.gets.chomp)
code = URI.decode_www_form(redirect_uri.query).to_h["code"]

# exchange code from URL for a refresh_token
require 'net/http'
uri = URI.parse('https://oauth2.googleapis.com/token')
params = {
  :code          => code,
  :client_id     => Yt.configuration.client_id,
  :client_secret => Yt.configuration.client_secret,
  :redirect_uri  => "https://www.manageiq.org",
  :grant_type    => "authorization_code"
}
puts params
response = Net::HTTP.post_form(uri, params)
puts response
response = JSON.parse(response.body)
puts response
refresh_token = response["refresh_token"]
puts refresh_token

puts
puts "Your refresh token is:"
puts refresh_token

This expands on the previous rake task to give full instructions on
publishing a sprint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants