Skip to content

feat(api): implement upsert() using MERGE INTO #11990

feat(api): implement upsert() using MERGE INTO

feat(api): implement upsert() using MERGE INTO #11990

Workflow file for this run

name: Conventional commits check
on:
# runs on `pull_request_target` events so that commenting on the PR is allowed
pull_request_target:
types: [opened, edited, synchronize, reopened]
jobs:
verify-commitlint:
name: Check PR title conforms to semantic-release
permissions:
contents: read
runs-on: ubuntu-latest
outputs:
lint_output: ${{ steps.lint.outputs.lint_output }}
failed: ${{ steps.lint.outputs.failed }}
steps:
- name: install node
uses: actions/setup-node@v6
with:
node-version: 22
- name: checkout code to pick up commitlint configuration
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: run commitlint
id: lint
run: |
failed=0
if ! lint_output=$(npx --yes commitlint -- --extends "commitlint/config-conventional" --verbose <<< "$COMMIT_MSG" 2>&1); then
failed=1
fi
{
echo "failed=$failed"
echo "lint_output<<EOF"
echo "$lint_output"
echo "EOF"
} | tee -a "$GITHUB_OUTPUT"
exit $failed
env:
COMMIT_MSG: |
${{ github.event.pull_request.title }}
${{ github.event.pull_request.body }}
comment-if-necessary:
permissions:
pull-requests: write
name: Add/update comment describing commitlint failure
runs-on: ubuntu-latest
needs:
- verify-commitlint
steps:
- name: find existing comment
uses: peter-evans/find-comment@v4
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: "ACTION NEEDED"
- name: if the PR title and body fail `commitlint`, post or update a comment
if: needs.verify-commitlint.outputs.failed == '1'
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: |
**ACTION NEEDED**
Ibis follows the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) for release automation.
The PR title and description are used as the merge commit message.
Please update your PR title and description to match the specification.
See https://github.com/ibis-project/ibis/blob/main/.releaserc.js
for the list of acceptable prefixes, eg "feat:", "fix:", "chore:", etc.
The commitlint output is:
```
${{ needs.verify-commitlint.outputs.lint_output }}
```
- name: If commitlint now passes, and comment exists, update it
if: needs.verify-commitlint.outputs.failed == '0' && steps.find-comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: The PR title and description conform to the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).