{"id":15626098,"url":"https://github.com/tibdex/github-app-token","last_synced_at":"2025-05-15T02:10:17.063Z","repository":{"id":39366422,"uuid":"254865575","full_name":"tibdex/github-app-token","owner":"tibdex","description":"Impersonate a GitHub App in a GitHub Action","archived":false,"fork":false,"pushed_at":"2024-04-01T21:16:44.000Z","size":855,"stargazers_count":545,"open_issues_count":10,"forks_count":151,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-05T19:11:16.890Z","etag":null,"topics":["github-action","github-app","github-token","impersonate","javascript-github-action"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/tibdex.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-04-11T12:43:00.000Z","updated_at":"2025-04-30T13:10:06.000Z","dependencies_parsed_at":"2024-06-18T22:35:02.743Z","dependency_job_id":"53737bc2-d379-450a-adf3-e6dede66a465","html_url":"https://github.com/tibdex/github-app-token","commit_stats":{"total_commits":25,"total_committers":9,"mean_commits":"2.7777777777777777","dds":0.4,"last_synced_commit":"3eb77c7243b85c65e84acfa93fdbac02fb6bd532"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibdex%2Fgithub-app-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibdex%2Fgithub-app-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibdex%2Fgithub-app-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibdex%2Fgithub-app-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tibdex","download_url":"https://codeload.github.com/tibdex/github-app-token/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259386,"owners_count":22040821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["github-action","github-app","github-token","impersonate","javascript-github-action"],"created_at":"2024-10-03T10:10:20.668Z","updated_at":"2025-05-15T02:10:12.046Z","avatar_url":"https://github.com/tibdex.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# GitHub App Token\n\nThis [JavaScript GitHub Action](https://help.github.com/en/actions/building-actions/about-actions#javascript-actions) can be used to impersonate a GitHub App when `secrets.GITHUB_TOKEN`'s limitations are too restrictive and a personal access token is not suitable.\n\nFor instance, from [GitHub Actions' docs](https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow):\n\n\u003e When you use the repository's `GITHUB_TOKEN` to perform tasks, events triggered by the `GITHUB_TOKEN`, with the exception of `workflow_dispatch` and `repository_dispatch`, will not create a new workflow run.\n\u003e This prevents you from accidentally creating recursive workflow runs.\n\u003e For example, if a workflow run pushes code using the repository's `GITHUB_TOKEN`, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.\n\nA workaround is to use a [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) from a [personal user/bot account](https://help.github.com/en/github/getting-started-with-github/types-of-github-accounts#personal-user-accounts).\nHowever, for organizations, GitHub Apps are [a more appropriate automation solution](https://developer.github.com/apps/differences-between-apps/#machine-vs-bot-accounts).\n\n# Example Workflow\n\n```yml\njobs:\n  job:\n    runs-on: ubuntu-latest\n    steps:\n      - id: create_token\n        uses: tibdex/github-app-token@v2\n        with:\n          app_id: ${{ secrets.APP_ID }}\n\n          # Optional.\n          # github_api_url: https://api.example.com\n\n          # Optional.\n          # installation_retrieval_mode: id\n\n          # Optional.\n          # installation_retrieval_payload: 1337\n\n          # Optional.\n          # Using a YAML multiline string to avoid escaping the JSON quotes.\n          # permissions: \u003e-\n          #   {\"pull_requests\": \"read\"}\n\n          private_key: ${{ secrets.PRIVATE_KEY }}\n\n          # Optional.\n          # repositories: \u003e-\n          #   [\"actions/toolkit\", \"github/docs\"]\n\n          # Optional.\n          # revoke: false\n\n      - run: \"echo 'The created token is masked: ${{ steps.create_token.outputs.token }}'\"\n```\n\n[Another use case for this action can (or could) be found in GitHub's own docs](https://web.archive.org/web/20230115194214/https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions#example-workflow-authenticating-with-a-github-app).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftibdex%2Fgithub-app-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftibdex%2Fgithub-app-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftibdex%2Fgithub-app-token/lists"}