Skip to content

Want to automate creation of a PR on behalf of a user #1971

@exosyphon-rxrevu

Description

@exosyphon-rxrevu

This is more of a request on using the API after struggling for several hours.

Is it possible to have someone push to a branch and then open a PR on behalf of that user?

Here is what I have so far and it doesn't reflect the changes on the original commit. Any guidance would be very appreciated, thank you!

name: Create PR

on:
  push: 
    branches-ignore: 
      - main

jobs:
  create-pr:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Make changes to pull request
        run: date +%s > report.txt
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v5
        with:
            title: ${{github.ref_name}}
            token: ${{secrets.TOKEN}}
            body: |  
              Auto-generated by [create-pull-request][1]
  
              [1]: https://github.com/peter-evans/create-pull-request
            base: main
            branch: ${{github.ref_name}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions