Skip to content
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

Pulling refs/heads/main into main #5

Draft
wants to merge 34 commits into
base: test-ubuntu-max
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4ab77db
update composite action
GuillaumeFalourd Mar 10, 2022
4519132
update README file
GuillaumeFalourd Mar 10, 2022
10c0dff
update actions test files
GuillaumeFalourd Mar 10, 2022
3c100ce
update action.yml file
GuillaumeFalourd Mar 10, 2022
8274eec
update action.yml file
GuillaumeFalourd Mar 10, 2022
118d82c
update action.yml file
GuillaumeFalourd Mar 10, 2022
b8b2d78
update action.yml file
GuillaumeFalourd Mar 10, 2022
eedbd94
update action.yml file
GuillaumeFalourd Mar 10, 2022
c873366
update action.yml file
GuillaumeFalourd Mar 10, 2022
2def112
update action.yml file
GuillaumeFalourd Mar 10, 2022
1f2bd2c
update action.yml file
GuillaumeFalourd Mar 10, 2022
0cbab5e
update action.yml file
GuillaumeFalourd Mar 10, 2022
877504e
update action.yml file
GuillaumeFalourd Mar 10, 2022
63157c1
update action.yml file
GuillaumeFalourd Mar 10, 2022
2bdee78
update action.yml file
GuillaumeFalourd Mar 10, 2022
7eeddee
update action.yml file
GuillaumeFalourd Mar 10, 2022
2302693
update action.yml file
GuillaumeFalourd Mar 10, 2022
2239d64
update windows test file
GuillaumeFalourd Mar 10, 2022
7702bbd
update windows test file
GuillaumeFalourd Mar 10, 2022
fdce3a6
refactor action
GuillaumeFalourd Mar 10, 2022
19e15cb
refactor action test workflows
GuillaumeFalourd Mar 10, 2022
c4674aa
update action name
GuillaumeFalourd Mar 10, 2022
6849b65
Update README.md
GuillaumeFalourd Mar 10, 2022
5ae32a6
Update README.md
GuillaumeFalourd Mar 10, 2022
fb8bd62
Update README.md
GuillaumeFalourd Mar 10, 2022
f64eb78
Update README.md
GuillaumeFalourd Mar 10, 2022
05d5bb5
Update README.md
GuillaumeFalourd Apr 9, 2022
d1a9410
Update README.md
GuillaumeFalourd Jul 5, 2022
e0f447e
Update action.yml
GuillaumeFalourd Feb 6, 2024
ef4c89e
Update README.md
GuillaumeFalourd Feb 6, 2024
e030d7f
Update README.md
GuillaumeFalourd Feb 6, 2024
8809323
Update README.md
GuillaumeFalourd Feb 6, 2024
95450b5
Merge pull request #14 from GuillaumeFalourd/test
GuillaumeFalourd Feb 7, 2024
45ea432
Update README.md
GuillaumeFalourd Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/macos_action_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,36 @@ on:
schedule:
- cron: "0 4 * * MON-FRI" # Runs at 04:00 UTC
push:
branches: [main]
workflow_dispatch:

jobs:
macos:
macos-min:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: GuillaumeFalourd/pull-request-action@main
with:
destination_branch: "main"
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: "main"
destination_branch: "test-macos-min"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

macos-max:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: GuillaumeFalourd/pull-request-action@main
with:
source_branch: "main"
destination_branch: "test-macos-max"
pr_title: "Pulling ${{ github.ref }} into main"
pr_body: "An automated PR"
pr_reviewer: "GuillaumeFalourd"
pr_assignee: "GuillaumeFalourd"
pr_label: "test"
pr_milestone: "Milestone 1"
pr_draft: true
pr_allow_empty: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 25 additions & 3 deletions .github/workflows/ubuntu_action_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,36 @@ on:
schedule:
- cron: "0 2 * * MON-FRI" # Runs at 02:00 UTC
push:
branches: [main]
workflow_dispatch:

jobs:
ubuntu:
ubuntu-min:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: GuillaumeFalourd/pull-request-action@main
with:
destination_branch: "main"
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: "main"
destination_branch: "test-ubuntu-min"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

ubuntu-max:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: GuillaumeFalourd/pull-request-action@main
with:
source_branch: "main"
destination_branch: "test-ubuntu-max"
pr_title: "Pulling ${{ github.ref }} into main"
pr_body: "An automated PR"
pr_reviewer: "GuillaumeFalourd"
pr_assignee: "GuillaumeFalourd"
pr_label: "test"
pr_milestone: "Milestone 1"
pr_draft: true
pr_allow_empty: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 25 additions & 3 deletions .github/workflows/windows_action_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,36 @@ on:
schedule:
- cron: "0 6 * * MON-FRI" # Runs at 06:00 UTC
push:
branches: [main]
workflow_dispatch:

jobs:
windows:
windows-min:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: GuillaumeFalourd/pull-request-action@main
with:
destination_branch: "main"
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: "main"
destination_branch: "test-windows-min"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

windows-max:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: GuillaumeFalourd/pull-request-action@main
with:
source_branch: "main"
destination_branch: "test-windows-max"
pr_title: "Pulling ${{ github.ref }} into main"
pr_body: "An automated PR"
pr_reviewer: "GuillaumeFalourd"
pr_assignee: "GuillaumeFalourd"
pr_label: "test"
pr_milestone: "Milestone 1"
pr_draft: true
pr_allow_empty: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62 changes: 60 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,70 @@
# Pull Request Action

☞ Github Actions to create pull request ⤵️
[![Action test on Ubuntu](https://github.com/GuillaumeFalourd/pull-request-action/actions/workflows/ubuntu_action_test.yml/badge.svg)](https://github.com/GuillaumeFalourd/pull-request-action/actions/workflows/ubuntu_action_test.yml) [![Action test on MacOS](https://github.com/GuillaumeFalourd/pull-request-action/actions/workflows/macos_action_test.yml/badge.svg)](https://github.com/GuillaumeFalourd/pull-request-action/actions/workflows/macos_action_test.yml) [![Action test on Windows](https://github.com/GuillaumeFalourd/pull-request-action/actions/workflows/windows_action_test.yml/badge.svg)](https://github.com/GuillaumeFalourd/pull-request-action/actions/workflows/windows_action_test.yml)

![](https://user-images.githubusercontent.com/22433243/157692326-2e75f43d-e563-4fa9-8947-67c06e4e469f.png)

☞ Github Actions to create pull request using Github CLI ⤵️

_**Note**: This action is supported on **all runners** operating systems (`ubuntu`, `macos`, `windows`)_

_Inspired from [https://github.com/repo-sync/pull-request](https://github.com/repo-sync/pull-request)_

## 📝 Features

- Create pull requests

- Add reviewers, assignees, labels, or milestones

- Customize pull request title and body

- Fail silently when a pull request already exists

## 📚 Usage

TODO
- This action uses [Github CLI](https://cli.github.com/) to create a Pull Request.

- [According to the documentation](https://docs.github.com/en/actions/using-workflows/using-github-cli-in-workflows), to authenticate on the workflow using Github CLI, you need to set the GITHUB_TOKEN context variable as environment variable.

- Note that if you need specific permissions, you can also set a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) instead.

### Minimum configurations

```yaml
- uses: GuillaumeFalourd/pull-request-action@v2
with:
destination_branch: "my-branch"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

### Full configurations

```yaml
- uses: GuillaumeFalourd/pull-request-action@v2
with:
source_branch: "main" # If blank, default: triggered branch
destination_branch: "feature" # If blank, default: main
pr_title: "Pulling ${{ github.ref }} into main" # Title of pull request
pr_body: "An automated PR" # Full markdown support, requires pr_title to be set
pr_reviewer: "john, britney" # Comma-separated list (no spaces)
pr_assignee: "john" # Comma-separated list (no spaces)
pr_label: "auto-pr" # Comma-separated list (no spaces)
pr_milestone: "Milestone 1" # Milestone name
pr_draft: true # Creates pull request as draft
pr_allow_empty: true # Creates pull request even if there are no changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Can use PAT as secret
```

## 🧩 Outputs

Field | Observation
------------ | ------------
`pr_url` | Pull request URL
`pr_number` | Pull request number
`has_changed_files` | Boolean string indicating whether any file has been changed
`pr_created` | Boolean string indicating whether a PR was created

## 🤝 Contributing

Expand Down
Loading