Draft
Conversation
- opennews-rake-tasks.gemspec - lib/opennews/rake_tasks/version.rb - lib/opennews/rake_tasks/configuration.rb (configurable ignore lists) - lib/opennews/rake_tasks.rb (auto-loader) - lib/opennews/rake_tasks/build.rake (validate_yaml, check, build, serve, clean) - lib/opennews/rake_tasks/test.rake (test namespace) - lib/opennews/rake_tasks/review.rake (review namespace) - lib/opennews/rake_tasks/format.rake (lint/format) - lib/opennews/rake_tasks/outdated.rake - README.md updated with setup/usage/extensibility docs Agent-Logs-Url: https://github.com/OpenNews/opennews-actions/sessions/840ec618-51e2-4c58-bacf-8c9450b7f589 Co-authored-by: tiffehr <60173+tiffehr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add packaging for shared Rake tasks as Ruby gem
Add opennews-rake-tasks Ruby gem
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packages the shared Rake tasks from
opennews-websiteinto aopennews-rake-tasksgem living in this repo, giving all OpenNews Jekyll sites a single DRY source for build, test, review, format, and outdated-check logic.Structure
opennews-rake-tasks.gemspec— gem spec; runtime deps:rake ~> 13.0,jekyll ~> 4.3,html-proofer ~> 5.0lib/opennews/rake_tasks/version.rb—VERSION = "0.1.0"lib/opennews/rake_tasks/configuration.rb—Configurationclass +OpenNews::RakeTasks.configure { }API; holds all repo-specific-by-default lists (html-proofer ignore URLs/files, external-link ignore lists, required files)lib/opennews/rake_tasks.rb— auto-loads all.rakefiles inlib/opennews/rake_tasks/lib/opennews/rake_tasks/build.rake—validate_yaml,check,build,serve,cleanlib/opennews/rake_tasks/test.rake—test+test:{html_proofer,templates,page_config,placeholders,a11y,performance}lib/opennews/rake_tasks/review.rake—review:external_links(configurable ignore lists),review:compare_deployed_siteslib/opennews/rake_tasks/format.rake—lint,format,format:ruby*,format:prettier*lib/opennews/rake_tasks/outdated.rake—outdated,outdated:direct,outdated:allREADME.md— setup (RubyGems / git source / GitHub Packages / separate repo options + pros/cons table), usage, and extensibility docsScope notes
deploy:*tasks are intentionally excluded — they read per-repo S3 bucket names from_config.ymland belong in each consuming repo's ownRakefile.test:html_proofer,review:external_links) and required-file checks (check) read fromOpenNews::RakeTasks.configurationat runtime, so consumer repos override only what differs.Consumer usage
Original prompt
Start the process of packaging shared/deduplicated Rake tasks as a Ruby gem for use by OpenNews static site (Jekyll) repos. This is a separate PR from the YAML GitHub Actions work, per instruction.
Goals
require 'opennews/rake_tasks'or equivalent.Files to add:
Bring over the following pros/cons options table from prior discussion (verbatim):
Constraints
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: The following public GitHub repos for OpenNews/ have been upgraded to pretty much the same core GitHub Actions based deploy mechanisms, rake tasks and developer-experience configuration files. It's repetitive and rife for code and functionality drift and should be consolidated into a Shared Composite Action.
Plan that action, if I were to upgrade the repos that still have Travis driving CI/CD work to follow the patterns in the latest Actions-focused upgrades but try to consolidate fixes and upgrades to a Shared Composition Action repo for the Org.
Upgraded to Actions:
In need of upgrade:
Assistant: Good. I have enough context. Let me now produce the plan.
Findings
datainstitute-websiteandknight-eta-2024-websiteshare an identical.travis.yml(same SHA:4bf053584de65dc1244f93e6a1b76ce5bbf28545). Decoded, the Travis config is:Both repos use
s3_website_revivedgem (not AWS CLI + OIDC), separate_config/staging/and_config/production/directories for S3 config, Ruby 3.1.2 on Xenial (EOL), and no Bundler/Gemfile — baregem install.etherpad-litehas a.travis.yml(5391 bytes — a Node.js/test matrix, not a Jekyll deploy). It has an existing.github/directory. This repo is fundamentally different: it's a Node.js application, not a Jekyll static site. It should be treated separately and is out of scope for the Jekyll Composite Action.Prompt revision note
"Shared Composite Action" is the correct term. You may also want to specify whether this is a reusable workflow (called with
workflow_call) or a composite action (called withuses:). These are different GitHub Actions primitives with different tradeoffs. The plan below covers both where relevant.Plan: OpenNews Shared Composite Action
1. What to extract — the repeated surface area
Across
opennews-website,srccon...This pull request was created from Copilot chat.
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.