GithubHelp home page GithubHelp logo

deriv-com / action-create-pull-request-another-repo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mohsen-deriv/action-create-pull-request-another-repo

0.0 0.0 0.0 7 KB

Shell 95.64% Dockerfile 4.36%

action-create-pull-request-another-repo's Introduction

Action Create PR to another repository github action

This GitHub Action copies a folder from the current repository to a location in another repository and create a pull request.

name: Push File

on: push

jobs:
  pull-request:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2

    - name: Create pull request
      uses: mohsen-deriv/[email protected]

      env:
        API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
      with:
        source_folder: 'source-folder'
        destination_repo: 'user-name/repository-name'
        destination_folder: 'folder-name'
        destination_base_branch: 'branch-name'
        destination_head_branch: 'branch-name'
        commit_message_title: "chore"
        user_email: '[email protected]'
        user_name: 'user-name'
        pull_request_reviewers: 'reviewers'

Variables

  • source_folder: The folder to be moved. Uses the same syntax as the cp command. Incude the path for any files not in the repositories root directory.
  • destination_repo: The repository to place the file or directory in.
  • destination_folder: [optional] The folder in the destination repository to place the file in, if not the root directory.
  • user_email: The GitHub user email associated with the API token secret.
  • user_name: The GitHub username associated with the API token secret.
  • destination_base_branch: [optional] The branch into which you want your code merged. Default is main.
  • destination_head_branch: The branch to create to push the changes. Cannot be master or main.
  • pull_request_reviewers: [optional] The pull request reviewers. It can be only one (just like 'reviewer') or many (just like 'reviewer1,reviewer2,...')
  • commit_message_title: [optional] The commit message in the branch, useful if you're using commitlint and want to have clean commit messages.

ENV

  • API_TOKEN_GITHUB: You must create a personal access token in you account. Follow the link:

You must select the scopes: 'repo = Full control of private repositories', 'admin:org = read:org' and 'write:discussion = Read:discussion';

Behavior Notes

The action will create any destination paths if they don't exist. It will also overwrite existing files if they already exist in the locations being copied to. It will not delete the entire destination repository.

Thank you paygoc6

I don't know why the main repository was inactive, so I created this repo as a replacement for this action.

Main Repo

You can check the main repo here, where I got the base code idea and applied some tweaks and configs.

https://github.com/paygoc6/action-pull-request-another-repo

action-create-pull-request-another-repo's People

Contributors

mohsen-deriv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.