Skip to content

Option to create PR with the image #65

Open
@abe-101

Description

@abe-101

I think it would be useful to have a flag where we can set it to open a PR instead of pushing to the main branch

I had a rule in place to prevent from pushing to the main repo and the action failed

A  diagram.svg

A  diagram.svg
diff: A  diagram.svg

Commit and push diagram
  /usr/bin/git commit -m Repo visualizer: update diagram
  [main a6487aa] Repo visualizer: update diagram
   1 file changed, 1 insertion(+)
   create mode 100644 diagram.svg
  /usr/bin/git push
  remote: error: GH006: Protected branch update failed for refs/heads/main.        
  remote: error: Changes must be made through a pull request.        
  To https://github.com/************************
   ! [remote rejected] main -> main (protected branch hook declined)
  error: failed to push some refs to 'https://github.com/************************'
  Error: Error: The process '/usr/bin/git' failed with exit code 1

My action:

name: Create diagram
on:
workflow_dispatch: {}
push:
  branches:
    - main
jobs:
get_data:
  runs-on: ubuntu-latest
  steps:
    - name: Checkout code
      uses: actions/checkout@master
    - name: Update diagram
      uses: githubocto/repo-visualizer@main
      with:
        excluded_paths: "ignore,.github"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions