{"id":24531935,"url":"https://github.com/julbme/gh-action-manage-branch","last_synced_at":"2025-03-15T20:16:20.256Z","repository":{"id":43726349,"uuid":"460417914","full_name":"julbme/gh-action-manage-branch","owner":"julbme","description":"GitHub Action to manage branches","archived":false,"fork":false,"pushed_at":"2022-12-03T21:04:14.000Z","size":647,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T13:48:19.787Z","etag":null,"topics":["branch","ci","create","delete","github-action"],"latest_commit_sha":null,"homepage":"https://julbme.github.io/gh-action-manage-branch/","language":"Java","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/julbme.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}},"created_at":"2022-02-17T12:04:20.000Z","updated_at":"2022-06-11T09:58:14.000Z","dependencies_parsed_at":"2022-08-22T13:00:56.324Z","dependency_job_id":null,"html_url":"https://github.com/julbme/gh-action-manage-branch","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julbme%2Fgh-action-manage-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julbme%2Fgh-action-manage-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julbme%2Fgh-action-manage-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julbme%2Fgh-action-manage-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julbme","download_url":"https://codeload.github.com/julbme/gh-action-manage-branch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243785080,"owners_count":20347409,"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":["branch","ci","create","delete","github-action"],"created_at":"2025-01-22T09:16:53.269Z","updated_at":"2025-03-15T20:16:20.197Z","avatar_url":"https://github.com/julbme.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/julbme/gh-action-manage-branch/actions/workflows/maven-build.yml/badge.svg)](https://github.com/julbme/gh-action-manage-branch/actions/workflows/maven-build.yml)\n[![Lint Commit Messages](https://github.com/julbme/gh-action-manage-branch/actions/workflows/commitlint.yml/badge.svg)](https://github.com/julbme/gh-action-manage-branch/actions/workflows/commitlint.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=julbme_gh-action-manage-branch\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=julbme_gh-action-manage-branch)\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/julbme/gh-action-manage-branch)\n\n# GitHub Action to manage branches\n\nThe GitHub Action for managing branches of the GitHub repository.\n\n- Create a new branch\n- Move the branch to another commit\n- Delete a branch\n\n## Usage\n\n### Example Workflow file\n\n- Create a branch:\n\n```yaml\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Create/Update the branch\n        uses: julbme/gh-action-manage-branch@v1\n        with:\n          name: branch-name\n          state: present\n          from: ${{ github.ref }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n- Delete a branch\n\n```yaml\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Delete the branch\n        uses: julbme/gh-action-manage-branch@v1\n        with:\n          name: branch-name\n          state: absent\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Inputs\n\n|  Name   |  Type  |   Default    |                                                                                Description                                                                                |\n|---------|--------|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name`  | string | `Not set`    | Name of the branch. **Required**                                                                                                                                          |\n| `state` | string | `present`    | Expected state of the branch. Valid values are `present` to create the branch or `absent` to delete the branch                                                            |\n| `from`  | string | `github.sha` | The reference from which to create or update the branch - could be a branch, a tag, a ref or a specific SHA. By default, it takes the commit that triggered the workflow. |\n\n### Outputs\n\n|  Name  |  Type  |                                  Description                                   |\n|--------|--------|--------------------------------------------------------------------------------|\n| `ref`  | string | Git ref of the branch `refs/heads/name`, or ` ` in case the branch is deleted. |\n| `name` | string | Name of the branch, or ` ` in case the branch is deleted.                      |\n| `sha`  | sha    | SHA Commit of the branch, or ` ` in case the branch is deleted.                |\n\n## Contributing\n\nThis project is totally open source and contributors are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulbme%2Fgh-action-manage-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulbme%2Fgh-action-manage-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulbme%2Fgh-action-manage-branch/lists"}