create-pull-request | GitHub action to create a pull request | Continous Integration library
kandi X-RAY | create-pull-request Summary
kandi X-RAY | create-pull-request Summary
A GitHub action to create a pull request for changes to your repository in the actions workspace. Changes to a repository in the Actions workspace persist between steps in a workflow. This action is designed to be used in conjunction with other steps that modify or add files to your repository. The changes will be automatically committed to a new branch and a pull request created.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of create-pull-request
create-pull-request Key Features
create-pull-request Examples and Code Snippets
Community Discussions
Trending Discussions on create-pull-request
QUESTION
I want to make a pull request from a react-native app. I am using the octokit-plugin-create-pull-request library from here. They have a function octokit.createPullRequest() in their documentation. I am at a point where I need to know the datatype of the value it returns. Is it an array or an object? Or is it another datatype?
...ANSWER
Answered 2022-Jan-12 at 18:59It returns a pull request object, with the properties you see in the example response https://docs.github.com/en/rest/reference/pulls#create-a-pull-request.
QUESTION
I have a static blog setup and every time I want a new post I have to commit and push a .md file. This is part of a group, so I was wondering if there is a way to automate the commit and push part every time a new .md file is saved to a google drive folder.
The first part is covered by IFTTT, where every time a new file is uploaded, a new issue is created on github containing the link to the file in the body.
However, I don't know how to create the action that will now download the file, create a new branch, commit and push the file to that branch and finally set up a pull request for me to approve.
If you know of any other way of automating this process I am open to suggestions!
Thanks!
Edit1:
I am not really sure how to complete this (including generating a random number where I wrote . Here's what I have so far:
...ANSWER
Answered 2021-Nov-19 at 17:15Updating your workflow to add the random number could be achieved using an output variable. I also think you need to add the actions/checkout
action to your repo to access the downloaded file.
QUESTION
I have two GitHub Actions in the same repo. I'm trying to update one from the other, but I get the following error when trying to commit and push the changes:
! [remote rejected] HEAD -> some-branch (refusing to allow a GitHub App to create or update workflow .github/workflows/the-other-action.yml without workflows permission)
This is a simplified version of the GH Action I'm trying to run:
...ANSWER
Answered 2021-Aug-26 at 17:10You need to use a Personal Access Token with workflows permission here, instead of the GITHUB_TOKEN
which has a defined scope.
Moreover, if this ${{ secrets.GITHUB_TOKEN }}
is your PAT, there might be a problem because you can't add secrets with the GITHUB_ prefix. So you would have to rename the secret following this syntax.
QUESTION
I have two repos on Azure DevOps, let's call them parent_repo
and child_repo
. The child_repo
is a fork of the parent. What I'd like to do is create a PR to merge master
of child_repo
to master
of parent_repo
using the Azure DevOps Services API, by way of its Python library.
According to these docs and this thread, forkSource
is the parameter needed to indicate that the source branch is in a fork, and to provide the repo_id
of that fork.
ANSWER
Answered 2020-Jul-08 at 09:44Okay, I dug a little deeper into the docs, starting here with forkSource
. Following that link into here then here it became apparent that forkSource
has to be formulated like so:
"forkSource": {"repository": {"id": child_repo_id}}
Oddly, the DevOps API was ignoring the nested repository
param instead of (preferably) throwing an error. This change resolves the issue and creates a PR resembling the one I'm after.
Full code:
QUESTION
I have GitHub repository with 2 branches: "master" & "develop".
The workflow for us is that any code should be committed to the "develop" branch then pushed to GitHub, then a Pull Request should be created to merge the commits into the "master" branch.
I am trying to write an Action that will create a Pull Request once a developer pushes commits to the branch "develop" and had the following script:
...ANSWER
Answered 2020-Jun-03 at 18:27If you look at the documentation of the create-pull-request action, it mentions that
Create Pull Request action will:
- Check for repository changes in the Actions workspace. This includes:
- untracked (new) files
- tracked (modified) files
- commits made during the workflow that have not been pushed
- Commit all changes to a new branch, or update an existing pull request branch.
- Create a pull request to merge the new branch into the base—the branch checked out in the workflow.
It would always need an intermediary branch where it can commit the changes.
So if you modify your workflow config as below, adding the Reset master branch
step to get the latest changes from the remote develop
branch and reset the master
branch, and specify branch: temp
for the action, the workflow would create a temp
branch with the same commits that you have pushed to develop
branch and open a PR from temp
to master
branch. In subsequent commits to develop, it would keep on making the same changes to temp
branch and open a PR similarly or update the existing PR.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install create-pull-request
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page