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

test #54

Closed
wants to merge 15 commits into from
Closed

test #54

Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 3 additions & 5 deletions .github/workflows/label-new-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ jobs:

- name: Checkout repository
uses: actions/checkout@v2

- name: Create Branch
id: create-branch
run: |
echo "We will create a branch with this name: $BRANCH_NAME"
git checkout -b $BRANCH_NAME
git push origin $BRANCH_NAME
echo "::set-output name=BRANCH_FULL_NAME::$BRANCH_NAME"
echo "::set-output name=BRANCH_SHA::$(git rev-parse HEAD)"
gh issue develop $ISSUE_NUMBER -b dev -n $BRANCH_NAME
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
BRANCH_NAME: ${{ steps.set-branch-name.outputs.BRANCH_FULL_NAME }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
13 changes: 13 additions & 0 deletions .github/workflows/label-pr-as-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
pull_request:
types: [opened]

jobs:
copy-labels:
runs-on: ubuntu-latest
name: Copy labels from linked issues
steps:
- name: copy-labels
uses: michalvankodev/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/pr-on-branch-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Pull Request on Push to branch
on:
push:
branches-ignore:
- main
- dev

jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: dev

- name: Create PR
run: |
echo "Get the list of PR for that branch that are open"
gh pr list -H ${{ github.ref_name}} -s "open"
PR_COUNT=$(gh pr list -H ${{ github.ref_name}} -s "open" | wc -l)
echo $PR_COUNT
echo "Checking if there are any PR already"
if [[ $PR_COUNT -gt 0 ]]; then
echo "Indeed there is at least one PR for this branch"
else
echo "There is no PR for this branch so we create one"
gh pr create -B $BASE_BRANCH -H $BRANCH_TO_MERGE --title "$PR_TITLE" --body "$PR_BODY"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_TITLE: "Autocreated PR: ${{ github.ref_name}}"
PR_BODY: "Created by Github action"
BASE_BRANCH: "dev"
BRANCH_TO_MERGE: ${{ github.ref}}


1 change: 1 addition & 0 deletions test-folder/.random
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# lwneflenflkew

Loading