{"id":15659472,"url":"https://github.com/kt3k/update-pr-description","last_synced_at":"2025-04-13T09:41:03.446Z","repository":{"id":35850197,"uuid":"219716079","full_name":"kt3k/update-pr-description","owner":"kt3k","description":"Update Pull Request Description on Push","archived":false,"fork":false,"pushed_at":"2025-02-14T23:31:49.000Z","size":1174,"stargazers_count":21,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T03:35:36.490Z","etag":null,"topics":["github-actions","pull-request"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/kt3k.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":"2019-11-05T10:17:13.000Z","updated_at":"2023-11-21T14:16:56.000Z","dependencies_parsed_at":"2025-03-02T21:34:23.993Z","dependency_job_id":"c976072f-bb7e-4d62-b720-48e9168e9541","html_url":"https://github.com/kt3k/update-pr-description","commit_stats":{"total_commits":24,"total_committers":8,"mean_commits":3.0,"dds":0.5,"last_synced_commit":"8077af9ce93a5ea30878f27eb2d6f4ae02a211ba"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fupdate-pr-description","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fupdate-pr-description/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fupdate-pr-description/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fupdate-pr-description/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kt3k","download_url":"https://codeload.github.com/kt3k/update-pr-description/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248693344,"owners_count":21146779,"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-actions","pull-request"],"created_at":"2024-10-03T13:17:04.964Z","updated_at":"2025-04-13T09:41:03.423Z","avatar_url":"https://github.com/kt3k.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Update Pull Request Description on Push\n\nThis github action updates the description (and/or title) of the PR by the given source and destination branches.\n\n# Usage\n\nThis action doesn't create a PR, but updates it. We recommend you should use this github action with [repo-sync/pull-request][]\n\n```yml\nname: Creates and Updates PR\non:\n  push:\n    branches:\n    - some-branch\njobs:\n  pull-request:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v3\n    - name: pull-request\n      uses: repo-sync/pull-request@v2\n      with:\n        github_token: ${{ secrets.GITHUB_TOKEN }}\n    - name: update-pull-request\n      uses: kt3k/update-pr-description@v2\n      with:\n        pr_body: \"**some description**\"\n        github_token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n[repo-sync/pull-request][] creates a PR, but the action doesn't update it if the PR already exists. If you need to update the description of the PR on each push, you can use this action for it.\n\n## Our use case\n\nWe creates a pull request from `master` to `release` and update the description on each push on `master`. Merging to release branch causes the actual release to the staging environment. So this github workflow works as the release preparation and we can see what is going to be released at the next release by seeing this pull request.\n\n```yml\nname: Creates and Updates PR\non:\n  push:\n    branches:\n    - master\njobs:\n  pull-request:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v3\n    - name: create-description\n      run: \"some script for creating PR description from the branch diff\"\n      id: description\n    - name: pull-request\n      uses: repo-sync/pull-request@v2\n      with:\n        github_token: ${{ secrets.GITHUB_TOKEN }}\n        destination_branch: release\n        pr_title: Release\n    - name: update-pull-request\n      uses: kt3k/update-pr-description@v2\n      with:\n        pr_body: ${{ steps.description.outputs.description }}\n        destination_branch: release\n        github_token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n# Parameters\n\n## Inputs\n\n### `github_token`\n\nThe GITHUB_TOKEN secret. This is required.\n\n### `pr_title`\n\nThe title of the PR. Optional.\n\n### `pr_body`\n\nThe body of the PR\n\n### `destination_branch`\n\nBase branch of the PR. Default is master.\n\n### `fail_on_error`\n\nOption to mark the job as failed in case there are errors during the action execution. Default is 'true'.\n\n## Outputs\n\nThis action has no outputs.\n\n# LICENSE\n\nApache License, Version 2.0\n\n[repo-sync/pull-request]: https://github.com/repo-sync/pull-request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fupdate-pr-description","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkt3k%2Fupdate-pr-description","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fupdate-pr-description/lists"}