{"id":18601662,"url":"https://github.com/eficode/resolve-pr-refs","last_synced_at":"2025-04-10T19:30:42.298Z","repository":{"id":38620624,"uuid":"428682381","full_name":"eficode/resolve-pr-refs","owner":"eficode","description":"Get the Git ref for comments on Pull Reguests","archived":false,"fork":false,"pushed_at":"2024-09-10T06:25:05.000Z","size":1204,"stargazers_count":5,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-04T03:02:58.444Z","etag":null,"topics":["git","github-actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eficode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2021-11-16T14:13:20.000Z","updated_at":"2024-09-10T06:25:07.000Z","dependencies_parsed_at":"2024-06-21T05:45:31.632Z","dependency_job_id":"eba23843-bc05-4e03-9c1e-e3f2cc2532c6","html_url":"https://github.com/eficode/resolve-pr-refs","commit_stats":{"total_commits":84,"total_committers":6,"mean_commits":14.0,"dds":0.4642857142857143,"last_synced_commit":"0c81a15f23da2a04dd3f4a5c46a9d89891d1342c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eficode%2Fresolve-pr-refs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eficode%2Fresolve-pr-refs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eficode%2Fresolve-pr-refs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eficode%2Fresolve-pr-refs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eficode","download_url":"https://codeload.github.com/eficode/resolve-pr-refs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281395,"owners_count":21077423,"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":["git","github-actions"],"created_at":"2024-11-07T02:09:05.727Z","updated_at":"2025-04-10T19:30:41.726Z","avatar_url":"https://github.com/eficode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github Action Resolve Pull Request Refs\n\nWhen your workflow triggers on a comment on PR (the `issue_comment`-event), you can use this action to resolve the Git ref for that pull-request.\n\n## Inputs\n\n### `token`\n**Required:** Github API Token\n\n## Outputs\n\n### `base_ref`\nPull request base ref.\n\n### `base_sha`\nThe SHA hash of the base ref.\n\n### `head_ref`\nPull request head ref.\n\n### `head_sha`\nThe SHA hash of the head ref.\n\n## Usage\n\n### Example usage\n\n```yaml\n- name: resolve pr refs\n  id: refs\n  uses: eficode/resolve-pr-refs@main\n  with:\n    token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Example usecase\n\n```yaml\non:\n  issue_comment:\n    types: [created]\njobs:\n  fast_forward_merge:\n    name: ff-merge\n    if: ${{ github.event.comment.body == '/ff-merge' }}\n    runs-on: ubuntu-latest\n    steps:\n      - name: resolve pr refs\n        id: refs\n        uses: eficode/resolve-pr-refs@main\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n      - name: checkout base\n        uses: actions/checkout@v2\n        with:\n          ref: ${{ steps.refs.outputs.base_ref }}\n      - name: fast forward merge pr\n        env:\n          HEAD_REF: ${{ steps.refs.outputs.head_ref }}\n        run: |\n          git fetch\n          git merge --ff-only origin/$HEAD_REF\n          git push\n```\n\n## Contributing\n\nCreate a PR against this repository. To test your changes, comment `/test` on your PR.\n\n## Building a new version\n\n### Ensure vercel/ncc is installed\n```\nnpm i -g @vercel/ncc\n```\n\n### Compile\n```\nncc build index.js --license licenses.txt\n```\n\n### Tag\n```\ngit tag -a -m \"Amazing new release\" v1.1\ngit push --follow-tags\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feficode%2Fresolve-pr-refs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feficode%2Fresolve-pr-refs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feficode%2Fresolve-pr-refs/lists"}