Skip to content
Closed
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
114 changes: 0 additions & 114 deletions .clang-format

This file was deleted.

20 changes: 20 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Get the current branch name
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)

# The Regex: {type}/GH-{number}_{description}
# Allowed types: task, feature, bug
REGEX="^(task|feature|bug)/GH-[0-9]+_.+$"

if [[ ! $BRANCH_NAME =~ $REGEX ]]; then
echo "--------------------------------------------------------"
echo "❌ Error: Invalid branch name '$BRANCH_NAME'"
echo "Format: {type}/GH-{number}_{description}"
echo "Example: feature/GH-123_refactor-unit-tests"
echo "Allowed types: task, feature, bug"
echo "--------------------------------------------------------"
exit 1
fi

exit 0
2 changes: 1 addition & 1 deletion .github/pages/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ weight = 20

# Footer contents
[extra.footer]
info = 'Copyright © 2024 <a href="https://github.com/sealangdotorg">The SEA Language</a>'
info = 'Copyright © 2026 <a href="https://github.com/sealangdotorg">The SEA Language</a>'

[[extra.footer.nav]]
name = "Code of Conduct"
Expand Down
4 changes: 2 additions & 2 deletions .github/pages/content/site/notice.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Responsibility for the content of external links lies with the owners and respon

## Copyright and License

All contents, texts, graphics, layouts, code or software Copyright © 2014-2024 The SEA Language.
All contents, texts, graphics, layouts, code or software Copyright © 2014-2026 The SEA Language.
All Rights reserved.
Any usage of material or information available on this website, including the reproduction, sales, alteration and publication is prohibited unless specifically approved by the The SEA Language.

The rust-based source code of The SEA Language is licensed under the [MPL-2.0](https://www.mozilla.org/en-US/MPL/2.0/) which is provided in an adopted form at [GitHub](https://github.com/sealangdotorg/sea/blob/master/LICENSE).

The legacy C++-based source code of The SEA Language (formally called CASM language) is licensed under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) which is provided in an adopted form at [GitHub](https://github.com/sealangdotorg/sea/blob/9428abcce54543ed53e61a52aaa3d792e12ddb5f/LICENSE.txt).
The legacy C++-based source code of The SEA Language which was originally called the CASM language is licensed under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) which is provided in an adopted form at [GitHub](https://github.com/sealangdotorg/sea/blob/9428abcce54543ed53e61a52aaa3d792e12ddb5f/LICENSE.txt).

The website is generated using the static page generator <a href="https://www.getzola.org/">Zola</a> and the theme is based on the <a href="https://github.com/aaranxu/adidoks">AdiDoks</a> layout.

Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/github-autolink-pr-to-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Autolink PR with Issue
on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
validate-pr:
runs-on: ubuntu-latest
steps:
- name: Validation
uses: actions/github-script@v7
with:
script: |
const branchName = context.payload.pull_request.head.ref;
const prTitle = context.payload.pull_request.title;

// 1. Regex Definitions
const branchRegex = /^(task|feature|bug)\/GH-(\d+)_.+$/;
const titleRegex = /^GH-(\d+): .+$/;

const branchMatch = branchName.match(branchRegex);
const titleMatch = prTitle.match(titleRegex);

// 2. Validate Branch Name
if (!branchMatch) {
core.setFailed(
`❌ Invalid Branch Name: "${branchName}"\n` +
`Format: {type}/GH-{number}_{description}\n` +
`Example: feature/GH-123_refactor-unit-tests` +
`Allowed types: task, feature, bug\n`
);
return;
}

// 3. Validate PR Title
if (!titleMatch) {
core.setFailed(
`❌ Invalid PR Title: "${prTitle}"\n` +
`Format: GH-{number}: {description}`
`Example: GH-123: Implement Login UI`
);
return;
}

const branchIssueNum = branchMatch[2];
const titleIssueNum = titleMatch[1];

// 4. Ensure Issue Numbers match
if (branchIssueNum !== titleIssueNum) {
core.setFailed(
`❌ Issue Number Mismatch!\n` +
`Branch uses GH-${branchIssueNum} but Title uses GH-${titleIssueNum}.`
);
return;
}

// 5. Verify the Issue exists on GitHub
try {
const { data: issue } = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: branchIssueNum,
});

console.log(`✅ Success: Issue #${branchIssueNum} verified.`);

// Post a single confirmation comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: `🤖 **Validation Passed**\n- **Linked Issue:** #${branchIssueNum}\n- **Branch & Title:** Synced ✅`
});

} catch (error) {
if (error.status === 404) {
core.setFailed(`❌ Validation Failed: Issue #${branchIssueNum} does not exist.`);
} else {
core.setFailed(`GitHub API Error: ${error.message}`);
}
}
Loading
Loading