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

send news to hub social #4721

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
bundle pristine ffi
# END Dependencies

- name: Build Site
- name: Prepare Site Metadata
run: |
gem install bundler
python -m pip install --upgrade pip
Expand All @@ -62,6 +62,9 @@ jobs:
curl --retry 5 https://gallantries.github.io/video-library/api/videos.json > metadata/video-library.json
curl --retry 5 https://gallantries.github.io/video-library/api/sessions.json > metadata/session-library.json
rdoc bin _plugins/ --output gtn_rdoc

- name: Build Site
run: |
JEKYLL_ENV=production bundle exec jekyll build --strict_front_matter -d _site/training-material
cp metadata/feedback.csv _site/training-material/api/feedback.csv
env:
Expand Down
12 changes: 6 additions & 6 deletions _plugins/jekyll-topic-filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,16 @@ def self.resolve_material(site, material)

all_resources = slides + tutorials
page_obj['mod_date'] = all_resources
.map{|p| Gtn::ModificationTimes.obtain_time(p[1].path) }
.max
.map { |p| Gtn::ModificationTimes.obtain_time(p[1].path) }
.max

page_obj['pub_date'] = all_resources
.map{|p| Gtn::PublicationTimes.obtain_time(p[1].path)}
.min
.map { |p| Gtn::PublicationTimes.obtain_time(p[1].path) }
.min

page_obj['version'] = all_resources
.map{|p| Gtn::ModificationTimes.obtain_modification_count(p[1].path) }
.max
.map { |p| Gtn::ModificationTimes.obtain_modification_count(p[1].path) }
.max

folder = material['dir']

Expand Down
5 changes: 5 additions & 0 deletions bin/news.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
server: 'https://matrix.org',
room: '!UQXYBSjdrLHcWgegmg:gitter.im',
}
'hub-social' => {
server: 'https://matrix.org',
room: '!gegHcnUCDklLbtVQor:matrix.org',
}
}
# rubocop:enable Style/GlobalVars
#
Expand Down Expand Up @@ -268,3 +272,4 @@ def send_news(output, options, channel: 'default')
# GOATS: Rss/news only.
output, newsworthy = build_news(data, only_news: true)
send_news(output, options, channel: 'wg-goat') if newsworthy
send_news(output, options, channel: 'hub-social') if newsworthy
2 changes: 1 addition & 1 deletion bin/workflows-fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def request(url)
def fetch_workflows(server)
begin
response = request("#{server}/api/workflows/")
rescue
rescue StandardError
puts "ERROR: Failed to fetch workflows from #{server}"
return []
end
Expand Down
Loading