Sha256: 4fcf809114a795161c0a34f40b2885ad075db7d49b6414a452e0bc44f97fa834

Contents?: true

Size: 824 Bytes

Versions: 110

Compression:

Stored size: 824 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require "time"

if `git status --porcelain lib/db`.empty?
  puts "Skipping, no DB changes to commit..."
  return
end

moment = Time.now.utc
branch_name = "db-updates-#{moment.strftime("%Y%m%d%H%M%S")}"

system("git", "checkout", "-b", branch_name) || abort("Unable to create branch")
system("git", "add", "lib/db")
system("git", "config", "--local", "user.email", "actions@github.com")
system("git", "config", "--local", "user.name", "github-actions")
system("git", "commit", "-m", "DB updates #{moment.iso8601}") || abort("Unable to commit changes")
system("git", "push", "-u", "origin", branch_name) || abort("Unable to push branch")
system("gh", "pr", "create", "--title", "DB updates #{moment.iso8601}", "--body", "From Github Actions") || abort("Unable to create PR")

Version data entries

110 entries across 106 versions & 13 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/mini_mime-1.1.5/bin/db_pull_request
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/mini_mime-1.1.5/bin/db_pull_request
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/mini_mime-1.1.5/bin/db_pull_request
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/mini_mime-1.1.5/bin/db_pull_request
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/mini_mime-1.1.5/bin/db_pull_request
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/mini_mime-1.1.5/bin/db_pull_request
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
study_line-0.2.7 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
study_line-0.2.6 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
study_line-0.2.5 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
study_line-0.2.4 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
study_line-0.2.3 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
study_line-0.2.2 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
study_line-0.2.1 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
study_line-0.2.0 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/mini_mime-1.1.5/bin/db_pull_request