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

Debugging Git workflows #156

Merged
merged 4 commits into from
Jul 14, 2023
Merged
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
5 changes: 5 additions & 0 deletions .changeset/chilled-cycles-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chart-io/react": minor
---

Debugging workflow
29 changes: 29 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,32 @@ jobs:
run: |
cd packages/react
npx chromatic --project-token ${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-zero-on-changes --only-changed

merge:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && github.event.pull_request.draft == false"
needs: [chromatic]
steps:
- uses: actions/checkout@v2
- name: Check if auto merge possible
id: check
run: |
commit_message=$(git log --format=%B -n 1 $GITHUB_SHA)
pr_title=$(jq --raw-output '.pull_request.title' $GITHUB_EVENT_PATH)
bot_username='github-actions[bot]'
echo "$commit_message"
echo "$pr_title"
echo "$GITHUB_ACTOR"
echo "::set-output name=merge::$(echo "$commit_message" | grep -q 'Version Packages' && echo "$pr_title" | grep -q 'Version Packages' && [ "$bot_username" == "$GITHUB_ACTOR" ])"
- name: Auto merge pull request
if: steps.check.outputs.merge == 'true'
uses: octokit/request-action@v2.x
with:
route: PUT /repos/IPWright83/chart-io/pulls/${{ github.event.pull_request.number }}/merge
token: ${{ secrets.GITHUB_TOKEN }}
body: |
{
"commit_title": "Auto merge",
"commit_message": "Automatically merged",
"sha": "${{ github.event.pull_request.head.sha }}"
}
35 changes: 0 additions & 35 deletions .github/workflows/version-packages-automerge.yml

This file was deleted.

Loading