{"id":20634039,"url":"https://github.com/irby/get-labels-on-push","last_synced_at":"2026-01-19T20:05:44.774Z","repository":{"id":184206653,"uuid":"671470563","full_name":"irby/get-labels-on-push","owner":"irby","description":"A GitHub Action that will extract labels from the most recent push","archived":false,"fork":false,"pushed_at":"2023-07-27T17:31:21.000Z","size":240,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T07:40:20.785Z","etag":null,"topics":[],"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/irby.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}},"created_at":"2023-07-27T11:47:38.000Z","updated_at":"2024-10-28T15:07:42.000Z","dependencies_parsed_at":"2023-07-27T13:52:35.357Z","dependency_job_id":null,"html_url":"https://github.com/irby/get-labels-on-push","commit_stats":null,"previous_names":["irby/get-labels-on-push"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irby%2Fget-labels-on-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irby%2Fget-labels-on-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irby%2Fget-labels-on-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irby%2Fget-labels-on-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irby","download_url":"https://codeload.github.com/irby/get-labels-on-push/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242635330,"owners_count":20161437,"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":[],"created_at":"2024-11-16T14:23:31.922Z","updated_at":"2026-01-19T20:05:44.762Z","avatar_url":"https://github.com/irby.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PR Labels on Push\n\nA GitHub Action that extracts labels from the pull request associated with a pushed commit and makes them available to other steps in your workflow. Labels are exposed as **step outputs** and **environment variables**, allowing you to conditionally run jobs or steps based on PR labels.\n\nThis action is intended to be used with `push` events where the pushed commit is part of a pull request.\n\n---\n\n## How do I use this?\n\nPerhaps you have a test or release step that should only run when a PR label such as `release:master` is set. Your workflow might look like this:\n\n```yaml\njobs:\n  test:\n    # Explicit permissions required for this action\n    permissions:\n      contents: read\n      pull-requests: read\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Get PR labels\n        id: pr-labels\n        uses: irby/get-labels-on-push@v1\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n\n      # Environment variables are created for each label\n      # Label names are normalized to uppercase and non-alphanumeric\n      # characters are replaced with underscores.\n      - run: |\n          if [ -n \"$GITHUB_PR_LABEL_RELEASE_MASTER\" ]; then\n            echo \"This is a release label!\"\n          fi\n\n      # Or use the action output.\n      # The labels output is a space-delimited string of lowercase\n      # kebab-case label names, surrounded by spaces.\n      - run: |\n          scripts/release-major.sh\n        if: contains(steps.pr-labels.outputs.labels, ' release-major ')\n```\n\n### Previous Versions of GitHub Action\n\nYou can reference or pin previous versions of this GitHub Action by referencing an existing [tag](https://github.com/irby/get-labels-on-push/tags).\n\nFor example:\n\n```yaml\n  - name: Get PR labels\n        id: pr-labels\n        uses: irby/get-labels-on-push@v1.0.1\n```\n\n## Code Based on the Following\n\nI created this GitHub Action to combine the behaviors of these two different GitHub Actions. I am in great gratitude to these projects for forming the basis of this project.\n\n- [joerick/pr-labels-action](https://github.com/joerick/pr-labels-action)\n- [shioyang/check-pr-labels-on-push-action](https://github.com/shioyang/check-pr-labels-on-push-action)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firby%2Fget-labels-on-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firby%2Fget-labels-on-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firby%2Fget-labels-on-push/lists"}