Request to change Slack account for Open Data Pathway #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Issue to Pull Request for Add Allocator | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
create_pull_request: | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.issue.title, '[Add Allocator]') && github.event.issue.user.login == 'martapiekarska' | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Create a new branch | |
run: git checkout -b add-allocator-${{ github.event.issue.number }} | |
- name: Create JSON file from issue | |
run: | | |
echo '{"title": "${{ github.event.issue.title }}", "body": ${{ github.event.issue.body }}}' > add-allocator-${{ github.event.issue.number }}.json | |
- name: Commit JSON file | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add add-allocator-${{ github.event.issue.number }}.json | |
git commit -m "Add JSON file for issue #${{ github.event.issue.number }}" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: add-allocator-${{ github.event.issue.number }} | |
- name: Create Pull Request | |
uses: repo-sync/pull-request@v2 | |
with: | |
source_branch: "add-allocator-${{ github.event.issue.number }}" | |
destination_branch: "main" | |
pr_title: "PR for ${{ github.event.issue.title }}" | |
pr_body: "This PR contains the contents of issue #${{ github.event.issue.number }} as a JSON file." |