Skip to content

Add 'branch' option #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 10, 2021
Merged

Add 'branch' option #25

merged 4 commits into from
Aug 10, 2021

Conversation

RazvanDH
Copy link
Contributor

Working on a project that has protected branches. I thought it would be a cool idea to be able to push to a separate branch, so I've added a branch parameter.

If you pass the branch param, the script will check if that branch exists and push the diagram there or create the branch and push the diagram.

As future improvements, maybe extracting this functionality to separate functions will be helpful.
Also, an ssh-key option could be useful for pushing to potentially protected branches, although that's a bit sketchy.

This is mostly needed for protected branches. If you want to push the diagram to a separate branch, you can pass the branch option. The script will check if that branch exists and push the diagram there or create the branch and push the diagram!
@Wattenberger
Copy link
Contributor

this is great, thanks! Made some tiny tweaks: update a variable name, added a log when creating a new branch, and added the param to the README.

@Wattenberger Wattenberger merged commit aa98244 into githubocto:main Aug 10, 2021
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.

2 participants