Skip to content

Create Pull Requests #9

Create Pull Requests

Create Pull Requests #9

Workflow file for this run

name: Create Pull Requests
on:
workflow_dispatch:
inputs:
autoqueue:
description: Whether to put the PR in queue automatically
type: boolean
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir testbed
echo `uuidgen` > testbed/`uuidgen`
- name: Generate Random Animal Emoji
id: random_animal_emoji
run: |
EMOJI_LIST=('๐Ÿถ' '๐Ÿฑ' '๐Ÿญ' '๐Ÿน' '๐Ÿฐ' '๐ŸฆŠ' '๐Ÿป' '๐Ÿผ' '๐Ÿจ' '๐Ÿฏ' '๐Ÿฆ' '๐Ÿฎ' '๐Ÿท' '๐Ÿธ' '๐Ÿต' '๐Ÿฆ„' '๐Ÿž' '๐Ÿฆ€' '๐Ÿง' '๐Ÿฆ')
RANDOM_EMOJI=${EMOJI_LIST[$RANDOM % ${#EMOJI_LIST[@]}]}
echo "RANDOM_EMOJI=$RANDOM_EMOJI" >> $GITHUB_ENV
- name: Create a pull request (autoqueue)
if: ${{ inputs.autoqueue }}
uses: peter-evans/create-pull-request@v5
with:
title: ${{env.RANDOM_EMOJI}} pull request
branch-suffix: random
body: |
This is a test pull request.
It will be put in queue automatically by Mergify right now.
You can chose the queue by adding a label:
- Use the `hotfix` label to put the PR in the hotfix queue;
- Use the `lowprio` label to put the PR in the lowprio queue;
- Do not set any label to have it enter the default queue.
labels: autoqueue
- name: Create the hotfix pull request
if: ${{ ! inputs.autoqueue }}
uses: peter-evans/create-pull-request@v5
with:
title: ${{env.RANDOM_EMOJI}} pull request
branch-suffix: random
body: |
This is a test pull request!
To put it in queue, run the `@mergifyio queue` command by posting a
comment.
You can use label to route the PR to any queue:
- `@mergifyio queue hotfix` to enter the hotfix queue;
- `@mergifyio queue` to enter the default queue;
- `@mergifyio queue lowprio` to enter the lowprio queue;
labels: