⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@ivanm696
Copy link

@ivanm696 ivanm696 commented Dec 27, 2025

create sity
create github token
рабочие кнапки записывать в README
@ivanm696 ivanm696 marked this pull request as draft January 6, 2026 17:41
@ivanm696 ivanm696 marked this pull request as ready for review January 6, 2026 17:41
@ivanm696
Copy link
Author

ivanm696 commented Jan 6, 2026

create PR automate
#11139

@ivanm696 ivanm696 marked this pull request as draft January 7, 2026 00:39
@ivanm696 ivanm696 marked this pull request as ready for review January 7, 2026 00:39
@ivanm696 ivanm696 marked this pull request as draft January 7, 2026 00:39
@ivanm696 ivanm696 marked this pull request as ready for review January 7, 2026 00:44
@ivanm696 ivanm696 marked this pull request as draft January 7, 2026 00:44
@ivanm696
Copy link
Author

ivanm696 commented Jan 7, 2026

#11139

@ivanm696 ivanm696 marked this pull request as ready for review January 7, 2026 21:48
@ivanm696
Copy link
Author

ivanm696 commented Jan 7, 2026

Automating pull requests (PRs) in GitHub can be achieved through several methods, most commonly using GitHub Actions, the GitHub CLI (gh), or API calls. The most popular approach for automated, recurring tasks is the "Create Pull Request" GitHub Action.

  1. Using GitHub Actions (Recommended for Automation)
    This method allows you to automatically create a pull request when files are modified in a workflow (e.g., automated updates, linting, or documentation changes).
    Action Name: peter-evans/create-pull-request
    Workflow Example (.github/workflows/auto-pr.yml):
    yaml
    name: Automatic Pull Request
    on:
    push:
    branches:
    • feature-branch # Trigger when code is pushed to this branch

jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

  - name: Make changes
    run: |
      echo "Automated update" >> automated_file.txt

  - name: Create Pull Request
    uses: peter-evans/create-pull-request@v7
    with:
      token: ${{ secrets.GITHUB_TOKEN }}
      commit-message: "chore: update automated file"
      title: "Automated Changes"
      body: "This PR was automatically created by GitHub Actions."
      branch: "automated-update-branch"
      base: "main" # Target branch
  1. Using GitHub CLI (gh)
    If you want to automate this from your local machine or a CI/CD server, the GitHub CLI is the best tool.
    Install GitHub CLI: brew install gh (or similar for your OS).
    Authenticate: gh auth login
    Run Command:
    bash
    gh pr create --title "Automated Feature Update" --body "Automated PR created via CLI" --base main --head feature-branch

  2. Using the GitHub API
    For custom, complex systems, you can use the REST API via curl.
    bash
    curl -X POST
    -H "Authorization: token YOUR_TOKEN"
    -H "Accept: application/vnd.github.v3+json"
    -d '{"title":"Automated Feature","body":"Automatic PR","head":"feature-branch","base":"main"}'
    api.github.com

  3. Key Configurations for Automation
    Permissions: For Actions to create PRs, you must allow it in Settings > Actions > General > Workflow permissions, ensuring "Read and write permissions" is selected.
    Auto-Merge: To automatically merge these PRs, enable "Allow auto-merge" in Settings > General > Pull Requests.
    Templates: Use PULL_REQUEST_TEMPLATE.md to standardize the content of your automated PRs.

  4. Specialized Automation
    tagpr: Used for automating release PRs based on semantic versioning.
    vblagoje/pr-auto: Generates comprehensive PR descriptions using LLMs (AI).

@ivanm696
Copy link
Author

ivanm696 commented Jan 7, 2026

#11140 Automating pull requests (PRs)

@ivanm696
Copy link
Author

ivanm696 commented Jan 7, 2026

Automating pull requests (PRs) in GitHub can be achieved through several methods, most commonly using GitHub Actions, the GitHub CLI (gh), or API calls. The most popular approach for automated, recurring tasks is the "Create Pull Request" GitHub Action.

  1. Using GitHub Actions (Recommended for Automation)
    This method allows you to automatically create a pull request when files are modified in a workflow (e.g., automated updates, linting, or documentation changes).
    Action Name: peter-evans/create-pull-request
    Workflow Example (.github/workflows/auto-pr.yml):
    yaml
    name: Automatic Pull Request
    on:
    push:
    branches:
    • feature-branch # Trigger when code is pushed to this branch

jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

  - name: Make changes
    run: |
      echo "Automated update" >> automated_file.txt

  - name: Create Pull Request
    uses: peter-evans/create-pull-request@v7
    with:
      token: ${{ secrets.GITHUB_TOKEN }}
      commit-message: "chore: update automated file"
      title: "Automated Changes"
      body: "This PR was automatically created by GitHub Actions."
      branch: "automated-update-branch"
      base: "main" # Target branch
  1. Using GitHub CLI (gh)
    If you want to automate this from your local machine or a CI/CD server, the GitHub CLI is the best tool.
    Install GitHub CLI: brew install gh (or similar for your OS).
    Authenticate: gh auth login
    Run Command:
    bash
    gh pr create --title "Automated Feature Update" --body "Automated PR created via CLI" --base main --head feature-branch

  2. Using the GitHub API
    For custom, complex systems, you can use the REST API via curl.
    bash
    curl -X POST
    -H "Authorization: token YOUR_TOKEN"
    -H "Accept: application/vnd.github.v3+json"
    -d '{"title":"Automated Feature","body":"Automatic PR","head":"feature-branch","base":"main"}'
    api.github.com

  3. Key Configurations for Automation
    Permissions: For Actions to create PRs, you must allow it in Settings > Actions > General > Workflow permissions, ensuring "Read and write permissions" is selected.
    Auto-Merge: To automatically merge these PRs, enable "Allow auto-merge" in Settings > General > Pull Requests.
    Templates: Use PULL_REQUEST_TEMPLATE.md to standardize the content of your automated PRs.

  4. Specialized Automation
    tagpr: Used for automating release PRs based on semantic versioning.
    vblagoje/pr-auto: Generates comprehensive PR descriptions using LLMs (AI).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant