-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from oqtopus-team/develop
release: 2024-09-05 16:48
- Loading branch information
Showing
16 changed files
with
286 additions
and
104 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
changelog: | ||
categories: | ||
- title: Enhancement 🎉 | ||
- title: New Feature 🎉 | ||
labels: | ||
- enhancement | ||
- feature | ||
- title: Bug Fixes 🐛 | ||
labels: | ||
- bug | ||
- bugfix | ||
- title: Refactor 🛠 | ||
labels: | ||
- refactor | ||
- title: Style 🎨 | ||
labels: | ||
- style | ||
- title: Test 🧪 | ||
labels: | ||
- test | ||
- title: CI/CD 🚀 | ||
labels: | ||
- ci | ||
- title: Documentation 📚 | ||
labels: | ||
- documentation |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: PR Labeler | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
labeler: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch all branches | ||
run: git fetch --all | ||
|
||
- name: Extract commit messages | ||
run: | | ||
COMMITS=$(git log --format=%B origin/develop..HEAD) | ||
echo "$COMMITS" | ||
echo "$COMMITS" > commits.txt | ||
- name: Debug - Print commits | ||
run: cat commits.txt | ||
|
||
- name: Set labels based on commit messages | ||
id: set-labels | ||
run: | | ||
labels=() | ||
while IFS= read -r commit; do | ||
echo "Processing commit: $commit" | ||
if [[ $commit =~ ^feat ]]; then | ||
labels+=("feature") | ||
elif [[ $commit =~ ^fix ]]; then | ||
labels+=("bugfix") | ||
elif [[ $commit =~ ^docs ]]; then | ||
labels+=("documentation") | ||
elif [[ $commit =~ ^style ]]; then | ||
labels+=("style") | ||
elif [[ $commit =~ ^refactor ]]; then | ||
labels+=("refactor") | ||
elif [[ $commit =~ ^test ]]; then | ||
labels+=("test") | ||
elif [[ $commit =~ ^ci ]]; then | ||
labels+=("ci") | ||
elif [[ $commit =~ ^chore ]]; then | ||
labels+=("chore") | ||
fi | ||
done < commits.txt | ||
# Remove duplicate labels and join them as a newline-separated string | ||
unique_labels=$(printf "%s\n" "${labels[@]}" | sort -u) | ||
# Debug output for unique labels | ||
echo "Unique labels:" | ||
echo "$unique_labels" | ||
# Set the output as a newline-separated string | ||
echo "labels<<EOF" >> $GITHUB_OUTPUT | ||
echo "$unique_labels" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Add labels to PR | ||
uses: actions-ecosystem/action-add-labels@v1 | ||
with: | ||
labels: ${{ steps.set-labels.outputs.labels }} | ||
|
||
- name: Assign PR creator | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
await github.rest.issues.addAssignees({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.issue.number, | ||
assignees: [context.actor] | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Overview (Uncomment one of the following templates) | ||
#feat: | ||
# └ A new feature | ||
#fix: | ||
# └ A bug fix | ||
#docs: | ||
# └ Documentation only changes | ||
#style: | ||
# └ Changes that do not affect the meaning of the code | ||
# (white-space, formatting, missing semi-colons, etc) | ||
#refactor: | ||
# └ A code change that neither fixes a bug nor adds a featur | ||
#test: | ||
# └ Adding missing or correcting existing tests | ||
#ci: | ||
# └ Changes to our CI configuration files and scripts | ||
#chore: | ||
# └ Updating grunt tasks etc; no production code change |
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
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
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
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
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
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
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
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
Oops, something went wrong.