{"id":15780184,"url":"https://github.com/rlespinasse/shortify-git-revision","last_synced_at":"2026-01-30T01:07:03.654Z","repository":{"id":42024252,"uuid":"435017622","full_name":"rlespinasse/shortify-git-revision","owner":"rlespinasse","description":"Shortify a git revision","archived":false,"fork":false,"pushed_at":"2025-11-30T22:38:30.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"v1.x","last_synced_at":"2025-12-03T08:38:59.435Z","etag":null,"topics":["git","github-action","hacktoberfest","revision","short"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/rlespinasse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","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":"rlespinasse"}},"created_at":"2021-12-04T21:58:59.000Z","updated_at":"2025-11-30T22:38:32.000Z","dependencies_parsed_at":"2023-12-25T21:36:53.117Z","dependency_job_id":"ac6f0ce0-07ab-41d2-8259-597c8305fa91","html_url":"https://github.com/rlespinasse/shortify-git-revision","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/rlespinasse/shortify-git-revision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fshortify-git-revision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fshortify-git-revision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fshortify-git-revision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fshortify-git-revision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rlespinasse","download_url":"https://codeload.github.com/rlespinasse/shortify-git-revision/tar.gz/refs/heads/v1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fshortify-git-revision/sbom","scorecard":{"id":778560,"data":{"date":"2025-08-11","repo":{"name":"github.com/rlespinasse/shortify-git-revision","commit":"d6e06c91c14f7c818bdb6bcef5133ce396bee39c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/19 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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"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":"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":"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":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/linter.yml:13","Info: jobLevel 'packages' permission set to 'read': .github/workflows/linter.yml:14","Warn: jobLevel 'statuses' permission set to 'write': .github/workflows/linter.yml:15","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/shortify-git-revision.yaml:212","Warn: jobLevel 'packages' permission set to 'write': .github/workflows/shortify-git-revision.yaml:215","Info: topLevel permissions set to 'read-all': .github/workflows/linter.yml:6","Info: topLevel permissions set to 'read-all': .github/workflows/shortify-git-revision.yaml:8"],"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linter.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rlespinasse/shortify-git-revision/linter.yml/v1.x?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/linter.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/rlespinasse/shortify-git-revision/linter.yml/v1.x?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/shortify-git-revision.yaml:219: update your workflow using https://app.stepsecurity.io/secureworkflow/rlespinasse/shortify-git-revision/shortify-git-revision.yaml/v1.x?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/shortify-git-revision.yaml:224: update your workflow using https://app.stepsecurity.io/secureworkflow/rlespinasse/shortify-git-revision/shortify-git-revision.yaml/v1.x?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/shortify-git-revision.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rlespinasse/shortify-git-revision/shortify-git-revision.yaml/v1.x?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/shortify-git-revision.yaml:170: update your workflow using https://app.stepsecurity.io/secureworkflow/rlespinasse/shortify-git-revision/shortify-git-revision.yaml/v1.x?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction 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":"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":"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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 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-23T04:18:12.572Z","repository_id":42024252,"created_at":"2025-08-23T04:18:12.572Z","updated_at":"2025-08-23T04:18:12.572Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28892890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["git","github-action","hacktoberfest","revision","short"],"created_at":"2024-10-04T18:40:48.914Z","updated_at":"2026-01-30T01:07:03.638Z","avatar_url":"https://github.com/rlespinasse.png","language":"Shell","funding_links":["https://github.com/sponsors/rlespinasse"],"categories":[],"sub_categories":[],"readme":"# Shortify git revision\n\n\u003e [!NOTE]\n\u003e A GitHub Action that generates shortened Git revision identifiers from full-length commit hashes and exposes them as environment variables.\n\n## Features\n\n- Converts full Git revisions into their shortened form\n- Validates revision format and handles invalid inputs\n- Provides both full and shortened revisions as environment variables\n- Configurable error handling for invalid revisions\n\n## Behavior\n\n- Creates `\u003cNAME\u003e` and `\u003cNAME\u003e_SHORT` environment variables for valid revisions\n- Environment variables are only set when the input revision is non-empty and valid\n- Handles invalid revisions based on configuration:\n  - Fails by default (controlled by `continue-on-error` input)\n  - Can be customized using `short-on-error` input to override default behavior\n\n## Usage\n\n- Shortify an environment variable\n\n  ```yaml\n  - uses: actions/checkout@v3\n  - uses: rlespinasse/shortify-git-revision@v1\n    with:\n      name: GITHUB_SHA\n  ```\n\n  Will make available\n\n  - `GITHUB_SHA_SHORT`\n\n- Shortify an environment variable with prefix\n\n  ```yaml\n  - uses: actions/checkout@v3\n  - uses: rlespinasse/shortify-git-revision@v1\n    with:\n      name: GITHUB_SHA\n      prefix: CI_\n  ```\n\n  Will make available\n\n  - `CI_GITHUB_SHA`\n  - `CI_GITHUB_SHA_SHORT`\n\n- Shortify any revision\n\n  ```yaml\n  - uses: actions/checkout@v3\n  - uses: rlespinasse/shortify-git-revision@v1\n    with:\n      name: SOME_REVISION\n      revision: 88428f56bd9d2751c47106bedfd148162dfa50b8\n  ```\n\n  Will make available\n\n  - `SOME_REVISION`\n  - `SOME_REVISION_SHORT`\n\n- Shortify a revision with a specific length\n\n  ```yaml\n  - uses: actions/checkout@v3\n  - uses: rlespinasse/shortify-git-revision@v1\n    with:\n      name: SIZED_REVISION\n      revision: 88428f56bd9d2751c47106bedfd148162dfa50b8\n      length: 10\n  ```\n\n  Will make available\n\n  - `SIZED_REVISION`\n  - `SIZED_REVISION_SHORT` (with value `88428f56bd`)\n\n- Shortify without publishing the environment variables\n\n  ```yaml\n  - uses: actions/checkout@v3\n  - uses: rlespinasse/shortify-git-revision@v1\n    with:\n      name: GITHUB_SHA\n  ```\n\n  Will **not** make available\n\n  - `GITHUB_SHA_SHORT`\n\n## Inputs\n\n### `name`\n\nWhen providing a `revision` through the revision input, the action will use this environment variable name to store the shortened hash.\n\nIf no environment variable is specified, the action automatically creates one using the `name` input (converted to uppercase) to store the provided `revision` value.\n\n### `revision`\n\nThe revision to shortify into an environment variable named `\u003cNAME\u003e_SHORT`.\n\nThis input is _Optional_.\n\n### `continue-on-error`\n\nIf the input is set to `true`, this action will not fail on a bad revision\n\nThe default value is `false`.\n\n### `short-on-error`\n\nIf the input is set to `true`, this action will short a bad revision\n\nThe default value is `false`.\n\n\u003e [!WARNING]\n\u003e\n\u003e - If this input is set to `true`, the input `continue-on-error` input will be ignored.\n\u003e - If this input is set to `true`, the input `length` input is mandatory.\n\n### `prefix`\n\nThe value will be prepend to each generated variable.\n\nThis input is _Optional_.\n\n### `length`\n\nthe `short` sha produce will have the length defined by the input.\n\nThis input is _Optional_.\n\n## Outputs\n\n| Output   | Description                 |\n| -------- | --------------------------- |\n| revision | The revision to be shortify |\n| short    | Revision Short              |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlespinasse%2Fshortify-git-revision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frlespinasse%2Fshortify-git-revision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlespinasse%2Fshortify-git-revision/lists"}