GitLab
Dropstone ஐ GitLab சிக்கல்கள் மற்றும் merge requests இல் பயன்படுத்தவும்.
Dropstone உங்கள் GitLab CI/CD pipeline அல்லது GitLab Duo மூலம் உங்கள் GitLab workflow உடன் ஒருங்கிணைக்கப்படுகிறது.
இரண்டு சந்தர்ப்பங்களிலும், Dropstone உங்கள் GitLab runners இல் இயங்கும்.
GitLab CI
Dropstone ஒரு வழக்கமான GitLab pipeline இல் செயல்படுகிறது. நீங்கள் இதை CI component ஆக pipeline இல் உருவாக்கலாம்
இங்கே நாம் Dropstone க்கான சமூக-உருவாக்கப்பட்ட CI/CD component ஐ பயன்படுத்துகிறோம்: nagyv/gitlab-dropstone.
Features
- ஒவ்வொரு job க்கும் custom configuration ஐ பயன்படுத்தவும்: Dropstone ஐ custom configuration directory உடன் configure செய்யவும், எடுத்துக்காட்டாக
./config/#custom-directoryDropstone invocation க்கு functionality ஐ enable அல்லது disable செய்ய. - Minimal setup: CI component Dropstone ஐ background இல் setup செய்கிறது, நீங்கள் Dropstone configuration மற்றும் initial prompt ஐ மட்டுமே உருவாக்க வேண்டும்.
- Flexible: CI component அதன் behavior ஐ customize செய்ய பல inputs ஐ support செய்கிறது
Setup
-
உங்கள் Dropstone authentication JSON ஐ File type CI environment variables ஆக Settings > CI/CD > Variables இன் கீழ் store செய்யவும். அவற்றை "Masked and hidden" ஆக mark செய்ய உறுதிசெய்யவும்.
-
உங்கள்
.gitlab-ci.ymlfile இல் பின்வருவனவற்றைச் சேர்க்கவும்.include: - component: $CI_SERVER_FQDN/nagyv/gitlab-dropstone/dropstone@2 inputs: config_dir: ${CI_PROJECT_DIR}/dropstone-config auth_json: $DROPSTONE_AUTH_JSON # The variable name for your Dropstone authentication JSON command: optional-custom-command message: "Your prompt here"
இந்த component க்கான மேலும் inputs மற்றும் use cases க்கு docs ஐ check out செய்யவும்.
GitLab Duo
Dropstone உங்கள் GitLab workflow உடன் ஒருங்கிணைக்கப்படுகிறது.
ஒரு comment இல் @dropstone ஐ mention செய்யவும், மற்றும் Dropstone உங்கள் GitLab CI pipeline இல் tasks ஐ execute செய்யும்.
Features
- Triage issues: Dropstone ஐ ஒரு issue ஐ பார்க்க மற்றும் அதை உங்களுக்கு விளக்க கேட்கவும்.
- Fix and implement: Dropstone ஐ ஒரு issue ஐ fix செய்ய அல்லது ஒரு feature ஐ implement செய்ய கேட்கவும். இது ஒரு புதிய branch ஐ உருவாக்கும் மற்றும் changes உடன் merge request ஐ raise செய்யும்.
- Secure: Dropstone உங்கள் GitLab runners இல் இயங்கும்.
Setup
Dropstone உங்கள் GitLab CI/CD pipeline இல் இயங்குகிறது, அதை setup செய்ய உங்களுக்கு தேவையான விஷயங்கள் இங்கே உள்ளன:
Tip:
Up-to-date instructions க்கு GitLab docs ஐ check out செய்யவும்.
- உங்கள் GitLab environment ஐ configure செய்யவும்
- CI/CD ஐ setup செய்யவும்
- Dropstone API key ஐ பெறவும் (Quickstart ஐ பார்க்கவும்)
- Service account ஐ உருவாக்கவும்
- CI/CD variables ஐ configure செய்யவும்
- Flow config file ஐ உருவாக்கவும். Example:
image: node:22-slim
commands:
- echo "Installing Dropstone"
- curl -fsSL https://dropstone.io/install | bash
- echo "Installing glab"
- export GITLAB_TOKEN=$GITLAB_TOKEN_DROPSTONE
- apt-get update --quiet && apt-get install --yes curl wget gpg git && rm --recursive --force /var/lib/apt/lists/*
- curl --silent --show-error --location "https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository" | bash
- apt-get install --yes glab
- echo "Configuring glab"
- echo $GITLAB_HOST
- echo "Creating Dropstone auth configuration"
- mkdir --parents ~/.local/share/dropstone
- |
cat > ~/.local/share/dropstone/auth.json << EOF
{
"dropstone": {
"type": "api",
"key": "$DROPSTONE_API_KEY"
}
}
EOF
- echo "Configuring git"
- git config --global user.email "dropstone@gitlab.com"
- git config --global user.name "Dropstone"
- echo "Testing glab"
- glab issue list
- echo "Running Dropstone"
- |
dropstone run "
You are an AI assistant helping with GitLab operations.
Context: $AI_FLOW_CONTEXT
Task: $AI_FLOW_INPUT
Event: $AI_FLOW_EVENT
Please execute the requested task using the available GitLab tools.
Be thorough in your analysis and provide clear explanations.
Use the glab CLI to access data from GitLab. The glab CLI is already authenticated.
If you are asked to summarize an MR or issue, or provide more information,
post back a note to the MR/Issue so the user can see it.
"
- git checkout --branch $CI_WORKLOAD_REF origin/$CI_WORKLOAD_REF
- echo "Checking for git changes and pushing if any exist"
- |
if ! git diff --quiet || ! git diff --cached --quiet || [ -n "$(git ls-files --others --exclude-standard)" ]; then
echo "Git changes detected, adding and pushing..."
git add .
if git diff --cached --quiet; then
echo "No staged changes to commit"
else
echo "Committing changes to branch: $CI_WORKLOAD_REF"
git commit --message "Dropstone changes"
echo "Pushing changes up to $CI_WORKLOAD_REF"
git push "https://gitlab-ci-token:$GITLAB_TOKEN@$GITLAB_HOST/$CI_PROJECT_PATH.git" $CI_WORKLOAD_REF
echo "Changes successfully pushed"
fi
else
echo "No git changes detected, skipping push"
fi
variables:
- DROPSTONE_API_KEY
- GITLAB_TOKEN_DROPSTONE
- GITLAB_HOST
விரிவான instructions க்கு GitLab Duo Agent Platform docs ஐ refer செய்யலாம்.
Examples
GitLab இல் Dropstone ஐ எவ்வாறு பயன்படுத்தலாம் என்பதற்கான சில examples இங்கே உள்ளன.
Tip:
@dropstone ஐ விட வேறு trigger phrase ஐ configure செய்யலாம்.
-
Explain an issue
GitLab issue இல் இந்த comment ஐ சேர்க்கவும்.
@dropstone explain this issueDropstone issue ஐ படித்து ஒரு clear explanation உடன் reply செய்யும்.
-
Fix an issue
GitLab issue இல், சொல்லவும்:
@dropstone fix thisDropstone ஒரு புதிய branch ஐ உருவாக்கும், changes ஐ implement செய்யும், மற்றும் changes உடன் merge request ஐ open செய்யும்.
-
Review merge requests
GitLab merge request இல் பின்வரும் comment ஐ விடவும்.
@dropstone review this merge requestDropstone merge request ஐ review செய்து feedback ஐ provide செய்யும்.