{"id":15404489,"url":"https://github.com/k1low/github-script-ruby","last_synced_at":"2026-02-27T02:03:07.991Z","repository":{"id":44946298,"uuid":"416184716","full_name":"k1LoW/github-script-ruby","owner":"k1LoW","description":"Write workflows scripting the GitHub API in Ruby","archived":false,"fork":false,"pushed_at":"2026-02-10T08:42:20.000Z","size":124,"stargazers_count":28,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-10T10:48:19.802Z","etag":null,"topics":["actions","github-api","ruby"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/github-script-for-ruby","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k1LoW.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"k1LoW","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-10-12T04:36:23.000Z","updated_at":"2026-02-10T08:42:12.000Z","dependencies_parsed_at":"2024-06-21T16:33:34.876Z","dependency_job_id":"de900264-71df-4f02-9be1-c49f39d32e2f","html_url":"https://github.com/k1LoW/github-script-ruby","commit_stats":{"total_commits":140,"total_committers":3,"mean_commits":"46.666666666666664","dds":0.2571428571428571,"last_synced_commit":"65c05ca1029fca20cdb6048069828cba6fbcfcb3"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/k1LoW/github-script-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgithub-script-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgithub-script-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgithub-script-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgithub-script-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k1LoW","download_url":"https://codeload.github.com/k1LoW/github-script-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fgithub-script-ruby/sbom","scorecard":{"id":546322,"data":{"date":"2025-08-11","repo":{"name":"github.com/k1LoW/github-script-ruby","commit":"65c05ca1029fca20cdb6048069828cba6fbcfcb3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/example-comment.yml:1","Warn: no topLevel permission defined: .github/workflows/example-pp.yml:1","Warn: no topLevel permission defined: .github/workflows/integration.yml:1","Warn: no topLevel permission defined: .github/workflows/ruby-version.yml:1","Warn: no topLevel permission defined: .github/workflows/tagpr.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/example-comment.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/example-comment.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/example-pp.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/example-pp.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:132: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:145: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:165: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/integration.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruby-version.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/ruby-version.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tagpr.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/tagpr.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tagpr.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/tagpr.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tagpr.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/tagpr.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tagpr.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/tagpr.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tagpr.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/tagpr.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tagpr.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/tagpr.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tagpr.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/tagpr.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tagpr.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/tagpr.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/k1LoW/github-script-ruby/test.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating ghcr.io/k1low/github-script-ruby-base:v2.3.0 to ghcr.io/k1low/github-script-ruby-base:v2.3.0@sha256:7e52f51856b83e336631fc4029b8bf45d08a8f90c3797ec548010c3c77fd7394","Warn: containerImage not pinned by hash: docker/Dockerfile:1: pin your Docker image by updating rubylang/ruby:3.1-dev-focal to rubylang/ruby:3.1-dev-focal@sha256:98239911233fe98e70b3ffb39a1e7e7c147515e40507d57bf54e59acda70eedc","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  12 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T09:36:58.457Z","repository_id":44946298,"created_at":"2025-08-20T09:36:58.458Z","updated_at":"2025-08-20T09:36:58.458Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29882632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","github-api","ruby"],"created_at":"2024-10-01T16:13:09.577Z","updated_at":"2026-02-27T02:03:07.728Z","avatar_url":"https://github.com/k1LoW.png","language":"Ruby","readme":"# github-script-ruby [![Test](https://github.com/k1LoW/github-script-ruby/actions/workflows/test.yml/badge.svg)](https://github.com/k1LoW/github-script-ruby/actions/workflows/test.yml) ![Coverage](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/github-script-ruby/coverage.svg) ![Code to Test Ratio](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/github-script-ruby/ratio.svg) ![Test Execution Time](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/github-script-ruby/time.svg)\n\nThis action makes it easy to write Ruby scripts in the workflow, just like [actions/github-script](https://github.com/actions/github-script).\n\nIn order to use this action, a `script` input is provided. The value of that input should be the body of an function call. The following arguments will be provided:\n\n- `github` A pre-authenticated [octokit.rb](https://github.com/octokit/octokit.rb) client with `auto_paginate=true`\n- `context` An OpenStruct instance containing the context of the workflow run\n- `core` An instance of [GitHub::Actions::Toolkit::Core](lib/github/actions/toolkit/core.rb)\n\n## Examples\n\n### Print the available attributes of context\n\nref: [actions/github-script example](https://github.com/actions/github-script#print-the-available-attributes-of-context)\n\n``` yaml\n- name: View context attributes\n  uses: k1LoW/github-script-ruby@v2\n  with:\n    script: pp context\n```\n### Comment on an issue\n\nref: [actions/github-script example](https://github.com/actions/github-script#comment-on-an-issue)\n\n``` yaml\non:\n  issues:\n    types: [opened]\n\njobs:\n  comment:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: k1LoW/github-script-ruby@v2\n        with:\n          script: |\n            repo = \"#{context.repo.owner}/#{context.repo.repo}\"\n            number = context.issue.number\n            comment = '👋 Thanks for reporting!'\n            github.add_comment(repo, number, comment)\n```\n\n### Use Gem packages\n\nIt is possible to change the Gemfile to use.\n\nIf you want to use octokit.rb, don't forget to add it.\n\n``` yaml\n- name: 'Post message to Slack #general channel'\n  uses: k1LoW/github-script-ruby@v2\n  with:\n    script: |\n      require 'slack-ruby-client'\n      Slack.configure do |config|\n        config.token = ENV['SLACK_API_TOKEN']\n      end\n      client = Slack::Web::Client.new\n      client.chat_postMessage(channel: '#general', text: 'Hello, Slack bot!')\n    gemfile: |\n      source 'https://rubygems.org'\n      gem 'octokit', '~\u003e 4.0'\n      gem 'slack-ruby-client'\n  env:\n    SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }}\n```\n\n### Pre-install packages for building native extentions.\n\n``` yaml\n- name: 'List users'\n  uses: k1LoW/github-script-ruby@v2\n  with:\n    script: |\n      require 'mysql2'\n      client = Mysql2::Client.new(:host =\u003e \"localhost\", :username =\u003e \"root\")\n      client.query('SELECT * FROM users').each do |row|\n        puts row['name']\n      end\n    pre-command: |\n      apt-get update\n      apt-get install -y libmysqld-dev\n    gemfile: |\n      source 'https://rubygems.org'\n      gem 'mysql2'\n```\n\n### Change Ruby version of use\n\n``` yaml\n- name: 'Hello Ruby version'\n  uses: k1LoW/github-script-ruby@v2\n  with:\n    script: |\n      repo = \"#{context.repo.owner}/#{context.repo.repo}\"\n      number = context.issue.number\n      comment = \"Hello using Ruby v#{RUBY_VERSION}\"\n      github.add_comment(repo, number, comment)\n    ruby-version: 2.7.5\n```\n\nThe `ruby-version:` feature is realized using the prebuilt Ruby releases are generated by [ruby-builder](https://github.com/ruby/ruby-builder)\n\n### Execute Ruby script file\n\n``` yaml\n- name: 'Capistrano deploy'\n  uses: k1LoW/github-script-ruby@v2\n  with:\n    gemfile-path: path/to/Gemfile\n    command: bundle exec cap deploy --gemfile=path/to/Gemfile\n    ruby-version: 2.7.5\n```\n\n## References\n\n- [actions/github-script](https://github.com/actions/github-script): Write workflows scripting the GitHub API in JavaScript\n- [ruby/setup-ruby](https://github.com/ruby/setup-ruby): An action to download a prebuilt Ruby and add it to the PATH in 5 seconds\n","funding_links":["https://github.com/sponsors/k1LoW"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1low%2Fgithub-script-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk1low%2Fgithub-script-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1low%2Fgithub-script-ruby/lists"}