Skip to content

Global R2B8, rotated by 36deg #55

Global R2B8, rotated by 36deg

Global R2B8, rotated by 36deg #55

name: Create branch from issue
on:
issues:
types: [labeled]
jobs:
createNewBranch:
if: github.event.label.name == 'data request'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Create new branch and commit
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git checkout -b issue-${{ github.event.issue.number }}/request
echo "${{ github.event.issue.number }}" > issue.txt
git add issue.txt
git commit -m "Add file for issue #${{ github.event.issue.number }}"
git push origin issue-${{ github.event.issue.number }}/request
- name: Add 'submitted' label to issue
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['submitted']
})