RSS Planet Python

Anwesha Das: Creating Pull request with GitHub Action

This is an example of a GitHub Actions workflow that creates a draft pull request (PR) in a repository. The workflow is triggered by a workflow dispatch event and requires a GIT_BRANCH input. The workflow runs on an ubuntu-latest environment and has permissions to write pull requests and contents. The workflow updates the README file, sets up git, and adds the README file to the repository. It then commits the changes with a test commit message and pushes the changes to the repository. The workflow creates a draft PR with a test commit message and body, and retrieves the existing PR URL. It then logs the pull request details and instructs the maintainers to trigger CI by undrafting the PR. The workflow requires permissions to create PRs in the repository, which can be set in the workflow settings. This example demonstrates how to create a draft PR via GitHub Actions. The workflow is intended to help the author's future self and may be useful for others as well.
anweshadas.in
anweshadas.in
Anwesha Das: Creating Pull request with GitHub Action
Create attached notes ...