Skip to content

Commit 5ddaa96

Browse files
committed
ci: 👷 add GitHub Actions workflows
1 parent 4f0aabf commit 5ddaa96

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/copilot.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# @format
2+
3+
instructions:
4+
pull_request:
5+
title:
6+
description: >
7+
Titles for pull requests must follow Conventional Commit rules. Start with a type (e.g., feat, fix, docs, style, refactor, perf, test, chore) followed by a colon and a brief summary. Optionally, add a scope in parentheses. Example: "feat(parser): add support for new syntax".
8+
examples:
9+
- 'feat(login): add OAuth2 support'
10+
- 'fix(api): correct null pointer error in user endpoint'
11+
- 'docs(readme): update installation instructions'
12+
- 'refactor(auth): streamline token validation logic'
13+
- 'chore(deps): bump version of express to 4.18.2'
14+
must_match_regex: '^(feat|fix|docs|style|refactor|perf|test|chore)(\([a-z0-9\-]+\))?:\s.+'
15+
error_message: >
16+
Pull request titles must follow Conventional Commit rules (e.g., "feat(login): add OAuth2 support"). Please update your PR title.

.github/workflow/rebase-pr.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# @format
2+
3+
name: Automatic Rebase
4+
on:
5+
issue_comment:
6+
types: [created]
7+
jobs:
8+
rebase:
9+
name: Rebase
10+
runs-on: ubuntu-latest
11+
if: >-
12+
github.event.issue.pull_request != '' &&
13+
(
14+
contains(github.event.comment.body, '/rebase') ||
15+
contains(github.event.comment.body, '/autosquash')
16+
)
17+
steps:
18+
- name: Checkout the latest code
19+
uses: actions/checkout@v3
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
23+
- name: Automatic Rebase
24+
uses: cirrus-actions/rebase@1.8
25+
with:
26+
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)