Skip to content

Commit 7e1b64d

Browse files
committed
feat(ci): improve BAT feature testing and clean up configuration
- Add prompt for generating conventional commit messages - Update workflow to include proper BAT feature testing - Add comprehensive version-specific testing for BAT - Update flux and gitleaks test versions - Clean up deprecated configuration files (.gic.yaml) - Enhance copilot instructions with new feature guidelines Assistant-model: Claude 3.5 Sonnet LLM-Contrib: 90%
1 parent 0a3f1df commit 7e1b64d

11 files changed

Lines changed: 53 additions & 74 deletions

.gic.yaml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/copilot-instructions.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
## Commit Messages.
1+
# General Instructions
22

3-
We follow conventional commit specification for commit messages. This means that each commit message should start with a type, followed by an optional scope, and then a description. The types we use are:
3+
- Ensure any code you produce is correct.
4+
- for commit messages use conventional commit format, e.g. `feat: add new feature`, `fix: correct a bug`, `docs: update documentation`, etc. https://www.conventionalcommits.org/en/v1.0.0/
45

5-
- **feat**: A new feature
6-
- **fix**: A bug fix
7-
- **docs**: Documentation only changes
8-
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
9-
- **refactor**: A code change that neither fixes a bug nor adds a feature
10-
- **perf**: A code change that improves performance
11-
- **test**: Adding missing or correcting existing tests
12-
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
13-
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
14-
- **chore**: Other changes that don't modify src or test files
6+
## New Feature Instructions
157

16-
More details in here https://www.conventionalcommits.org/en/v1.0.0/
8+
When creating a new feature, follow these steps:
9+
- Update the README.md to include the new feature in the list of features.
10+
- Each feature should be implemented under src/feature-name. Include a devcontainer-feature.json and install.sh file.
11+
- The install.sh file should install the package from the source repository. Not using a package manager like apt.
12+
- Each feature should have a test under test/feature-name/test.sh
13+
- Each feature should include a global test under test/_global/feature-name-specific-version.sh if a specific version can be installed.
14+
- Update the ../../test/_global/all-tools.sh to validate the new feature is installed.
15+
- Update the ../../test/_global/scenarios.json to include the new feature.
16+
- include the feature in the workflows
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Generate a Git commit message using the Conventional Commits format. Then, include three --trailer fields:
2+
3+
Assistant-model: The name of the AI model (e.g., GPT-4o)
4+
5+
LLM-Contrib: An estimated percentage of contribution from the AI (e.g., 60%)
6+
7+
Prompt: A brief human instruction or goal (e.g., "Refactor for readability")
8+
9+
Format the final output like this:
10+
11+
bash
12+
Copy
13+
Edit
14+
git commit --message "type(scope): concise description" \
15+
--trailer "Assistant-model: GPT-4o" \
16+
--trailer "LLM-Contrib: 60%" \
17+
--trailer "Prompt: <short description of prompt>"
18+
Use an appropriate Conventional Commit type (like feat, fix, refactor, docs, etc.) and optionally include a scope if relevant.

.github/prompts/new-feature.prompt.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- skopeo
2828
- uv
2929
- codex
30+
- bat
3031
baseImage:
3132
- debian:latest
3233
- ubuntu:latest

src/bat/devcontainer-feature.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"version": {
88
"type": "string",
99
"default": "latest",
10-
"description": "Version of bat to install from GitHub releases."
10+
"description": "Version of bat to install from GitHub releases e.g. v0.22.0"
1111
}
1212
}
13-
}
13+
}

src/bat/install.sh

100644100755
File mode changed.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
source dev-container-features-test-lib
5+
check "bat with specific version" /bin/bash -c "bat --version | grep '0.25.0'"
6+
7+
reportResults

test/_global/flux-specific-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
set -e
44
source dev-container-features-test-lib
5-
check "flux with specific version" /bin/bash -c "flux version --client | grep 'v0.37.0'"
5+
check "flux with specific version" /bin/bash -c "flux version --client | grep 'v2.6.4'"
66

77
reportResults

test/_global/gitleaks-specific-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
set -e
44
source dev-container-features-test-lib
5-
check "gitleaks with specific version" /bin/bash -c "gitleaks version | grep '8.17.0'"
5+
check "gitleaks with specific version" /bin/bash -c "gitleaks version | grep '8.28.0'"
66

77
reportResults

0 commit comments

Comments
 (0)