{"id":7743897,"name":"vbem/flatten-contexts","ecosystem":"actions","description":"Dump flattened GitHub contexts for friendly debugging","homepage":"https://github.com/marketplace/actions/flatten-contexts","licenses":"apache-2.0","normalized_licenses":["Apache-2.0"],"repository_url":"https://github.com/vbem/flatten-contexts","keywords_array":["actions","contexts","debug","dump","github-actions"],"namespace":"vbem","versions_count":4,"first_release_published_at":"2022-04-02T15:45:49.000Z","latest_release_published_at":"2023-09-18T02:11:49.000Z","latest_release_number":"v1.0.2","last_synced_at":"2026-05-20T15:49:25.549Z","created_at":"2023-05-17T08:45:31.940Z","updated_at":"2026-05-20T15:49:25.549Z","registry_url":"https://github.com/vbem/flatten-contexts","install_command":null,"documentation_url":null,"metadata":{"name":"Flatten Contexts","author":"@vbem","description":"Dump flattened GitHub contexts for friendly debugging","branding":{"icon":"align-justify","color":"green"},"inputs":{"sep":{"description":"Separator between key and value","required":false,"default":""}},"outputs":{},"runs":{"using":"composite","steps":[{"name":"Dump flattened GitHub actions contexts for debugging","id":"main","env":{"STEP_CTX_GITHUB":"${{ toJson(github) }}","STEP_CTX_JOB":"${{ toJson(job) }}","STEP_CTX_STEPS":"${{ toJson(steps) }}","STEP_CTX_RUNNER":"${{ toJson(runner) }}","STEP_CTX_STRATEGY":"${{ toJson(strategy) }}","STEP_CTX_MATRIX":"${{ toJson(matrix) }}"},"shell":"bash","run":"# implementation details\n\n# Group stdin to stderr with title\n# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines\n#   $1: group title\n#   stdin: logs\n#   stderr: grouped logs\n#   $?: 0 if successful and non-zero otherwise\nfunction kit::wf::group {\n    echo \"::group::$1\"      \u003e\u00262\n    echo \"$(\u003c /dev/stdin)\"  \u003e\u00262\n    echo '::endgroup::'     \u003e\u00262\n}\n\n# Flatten JSON to key-value lines\n#   $1: separator (default as ' 👉 ')\n#   stdin: json\n#   stdout: flattened key-value lines\n#   $?: 0 if successful and non-zero otherwise\nfunction kit::json::flatten {\n    jq -Mcr --arg sep \"${1:- 👉 }\" \\\n    'paths(type!=\"object\" and type!=\"array\") as $p | {\"key\":$p|join(\".\"),\"value\":getpath($p)} | \"\\(.key)\\($sep)\\(.value|@json)\"'\n}\n\n# Render the context\n#   $1: context name\n#   stdin: json\n#   stderr: redered output\n#   $?: 0 if successful and non-zero otherwise\nfunction render {\n    kit::json::flatten '${{ inputs.sep }}' | kit::wf::group \"📚 GitHub context: '$1'\"\n}\n\njq -Mcre '{runner:.}' \u003c\u003c\u003c \"$STEP_CTX_RUNNER\" | render \"runner\"\njq -Mcre 'del(.token)|del(.event)|{github:.}' \u003c\u003c\u003c \"$STEP_CTX_GITHUB\" | render \"github\"\njq -Mcre '{github:{event:.event}}' \u003c\u003c\u003c \"$STEP_CTX_GITHUB\" | render \"github.event\"\njq -Mcre '{job:.}' \u003c\u003c\u003c \"$STEP_CTX_JOB\" | render \"job\"\njq -Mcre '{steps:.}' \u003c\u003c\u003c \"$STEP_CTX_STEPS\" | render \"steps\"\njq -Mcre '{strategy:.}' \u003c\u003c\u003c \"$STEP_CTX_STRATEGY\" | render \"strategy\"\njq -Mcre '{matrix:.}' \u003c\u003c\u003c \"$STEP_CTX_MATRIX\" | render \"matrix\"\n"}]},"default_branch":"main","path":null},"repo_metadata":{"uuid":"477080111","full_name":"vbem/flatten-contexts","owner":"vbem","description":"An action dumps flattened GitHub contexts for debugging.","archived":false,"fork":false,"pushed_at":"2023-09-18T02:30:00.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-09-18T03:10:41.751Z","etag":null,"topics":["actions","contexts","debug","dump","github-actions"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/flatten-contexts","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vbem.png","metadata":{},"created_at":"2022-04-02T14:35:48.000Z","updated_at":"2023-09-18T03:10:41.751Z","dependencies_parsed_at":"2023-01-04T12:39:06.080Z","dependency_job_id":null,"html_url":"https://github.com/vbem/flatten-contexts","commit_stats":null,"previous_names":[],"tags_count":3,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbem","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":159759909,"owners_count":8071287,"icon_url":"https://github.com/github.png","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"},"owner_record":{"login":"vbem","name":"Lei LI","uuid":"5989600","kind":"user","description":"Cloud Solution Architect with ISTJ personality, fighting against entropy increase, believing successful digital transition always stands by the KISS principle.","email":"","website":"lilei.tech","location":"Shanghai, China","twitter":"vbem","company":"@ingka-group-digital","icon_url":"https://avatars.githubusercontent.com/u/5989600?u=971b7d7a62e6cd87e9ac706af307821793d5e80c\u0026v=4","repositories_count":4,"last_synced_at":"2023-05-02T07:36:27.925Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/vbem","created_at":"2023-05-02T07:36:27.932Z","updated_at":"2023-05-02T07:36:27.932Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbem","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbem/repositories"},"tags":[{"name":"v1","sha":"241d1e365afc20c5a46e08dc53bcb35c1b3ba8ee","kind":"commit","published_at":"2022-04-03T10:30:32.000Z","download_url":"https://codeload.github.com/vbem/flatten-contexts/tar.gz/v1","html_url":"https://github.com/vbem/flatten-contexts/releases/tag/v1","dependencies_parsed_at":"2023-06-01T12:59:20.516Z","dependency_job_id":null,"tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/tags/v1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/tags/v1/manifests"},{"name":"v1.0.1","sha":"241d1e365afc20c5a46e08dc53bcb35c1b3ba8ee","kind":"commit","published_at":"2022-04-03T10:30:32.000Z","download_url":"https://codeload.github.com/vbem/flatten-contexts/tar.gz/v1.0.1","html_url":"https://github.com/vbem/flatten-contexts/releases/tag/v1.0.1","dependencies_parsed_at":"2023-06-01T12:59:19.721Z","dependency_job_id":null,"tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/tags/v1.0.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/tags/v1.0.1/manifests"},{"name":"v1.0.0","sha":"796d09e83c6d8d0ab731635b13ef044e9e618f80","kind":"commit","published_at":"2022-04-02T15:45:49.000Z","download_url":"https://codeload.github.com/vbem/flatten-contexts/tar.gz/v1.0.0","html_url":"https://github.com/vbem/flatten-contexts/releases/tag/v1.0.0","dependencies_parsed_at":"2023-06-01T12:59:21.281Z","dependency_job_id":null,"tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/tags/v1.0.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fflatten-contexts/tags/v1.0.0/manifests"}]},"repo_metadata_updated_at":"2023-09-18T03:14:11.034Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":40.26221692491061,"dependent_packages_count":0.0,"stargazers_count":27.664104867418573,"forks_count":35.22640316731543,"docker_downloads_count":null,"average":25.788181239911154},"purl":"pkg:githubactions/vbem/flatten-contexts","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/actions/vbem/flatten-contexts","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/actions/vbem/flatten-contexts","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/actions/vbem/flatten-contexts/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":null,"versions_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/vbem%2Fflatten-contexts/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/vbem%2Fflatten-contexts/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/vbem%2Fflatten-contexts/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/vbem%2Fflatten-contexts/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/vbem%2Fflatten-contexts/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/vbem%2Fflatten-contexts/codemeta","maintainers":[]}