Dropstone Docs

GitHub

GitHub சிக்கல்கள் மற்றும் pull-requests இல் Dropstone ஐ பயன்படுத்தவும்.

Dropstone உங்கள் GitHub பணிப்பாய்வுடன் ஒருங்கிணைக்கப்பட்டுள்ளது. எந்த கருத்திலும் /dropstone ஐ குறிப்பிடவும் மற்றும் Dropstone உங்கள் GitHub Actions runner இல் பணியை செயல்படுத்தும்.


அம்சங்கள்

  • சிக்கல்களை வகைப்படுத்தவும்: Dropstone ஐ ஒரு சிக்கலைப் பார்க்கவும் மற்றும் அதை உங்களுக்கு விளக்கவும் கேளுங்கள்.
  • சரிசெய்து செயல்படுத்தவும்: Dropstone ஐ ஒரு சிக்கலைச் சரிசெய்யவும் அல்லது ஒரு அம்சத்தை செயல்படுத்தவும் கேளுங்கள். இது ஒரு புதிய கிளையில் வேலை செய்து அனைத்து மாற்றங்களுடன் PR ஐ சமர்ப்பிக்கும்.
  • பாதுகாப்பு: Dropstone உங்கள் GitHub இன் runners இல் இயங்குகிறது.

நிறுவல்

GitHub repo இல் உள்ள ஒரு project இல் பின்வரும் கட்டளையை இயக்கவும்:

dropstone github install

இது GitHub app ஐ நிறுவுவது, workflow ஐ உருவாக்குவது மற்றும் secrets ஐ அமைப்பது வழியாக உங்களை வழிநடத்தும்.


கையேடு அமைப்பு

அல்லது நீங்கள் இதை கையேடுவாக அமைக்கலாம்.

  1. GitHub app ஐ நிறுவவும்

    github.com/apps/dropstone-agent க்கு செல்லவும். இது target repository இல் நிறுவப்பட்டுள்ளதை உறுதிசெய்யவும்.

  2. Workflow ஐ சேர்க்கவும்

    உங்கள் repo இல் .github/workflows/dropstone.yml க்கு பின்வரும் workflow file ஐ சேர்க்கவும். env இல் பொருத்தமான model மற்றும் தேவையான API keys ஐ அமைக்க உறுதிசெய்யவும்.

    name: dropstone
    
    on:
      issue_comment:
        types: [created]
      pull_request_review_comment:
        types: [created]
    
    jobs:
      dropstone:
        if: contains(github.event.comment.body, '/dropstone')
        runs-on: ubuntu-latest
        permissions:
          id-token: write
        steps:
          - name: Checkout repository
            uses: actions/checkout@v6
            with:
              fetch-depth: 1
              persist-credentials: false
    
          - name: Run Dropstone
            uses: blankline-org/dropstone-cli/github@latest
            env:
              DROPSTONE_API_KEY: ${{ secrets.DROPSTONE_API_KEY }}
            with:
              model: dropstone/dropstone-pro
              # share: true
              # github_token: xxxx
    
  3. உங்கள் API key ஐ repository secrets இல் சேமிக்கவும்

    உங்கள் organization அல்லது repository Settings இல், இடதுபுறத்தில் Secrets and variables ஐ விரிவாக்கவும் மற்றும் Actions ஐ தேர்ந்தெடுக்கவும். DROPSTONE_API_KEY ஐ ஒரு புதிய repository secret ஆக சேர்க்கவும்.


கட்டமைப்பு

  • model: பயன்படுத்த Dropstone tier. dropstone/dropstone-fast, dropstone/dropstone-pro, அல்லது dropstone/dropstone-heavy இல் ஒன்று. இது தேவையான.

  • agent: பயன்படுத்த agent. ஒரு primary agent ஆக இருக்க வேண்டும். config இல் default_agent அல்லது "build" க்கு fallback செய்யவும் (கண்டுபிடிக்கப்படாவிட்டால்).

  • share: Dropstone session ஐ பகிர வேண்டுமா. பொது repositories க்கு true க்கு defaults.

  • prompt: Dropstone இன் default behavior ஐ override செய்ய optional custom prompt. Dropstone requests ஐ எவ்வாறு செயல்படுத்துகிறது என்பதை customize செய்ய இதை பயன்படுத்தவும்.

  • token: Comments ஐ உருவாக்குவது, மாற்றங்களை commit செய்வது, மற்றும் pull requests ஐ திறப்பது போன்ற operations ஐ செய்ய optional GitHub access token. முன்னிருப்பாக, Dropstone Dropstone GitHub App இலிருந்து installation access token ஐ பயன்படுத்துகிறது, எனவே commits, comments, மற்றும் pull requests app இலிருந்து வருவதாக தோன்றுகிறது.

    மாற்றாக, நீங்கள் GitHub Action runner இன் built-in GITHUB_TOKEN ஐ Dropstone GitHub App ஐ நிறுவாமல் பயன்படுத்தலாம். உங்கள் workflow இல் தேவையான permissions ஐ வழங்க உறுதிசெய்யவும்:

    permissions:
      id-token: write
      contents: write
      pull-requests: write
      issues: write
    

    நீங்கள் விரும்பினால் personal access tokens(PAT) ஐ பயன்படுத்தலாம்.


ஆதரிக்கப்பட்ட Events

Dropstone பின்வரும் GitHub events மூலம் trigger செய்யப்படலாம்:

Event TypeTriggered ByDetails
issue_commentஒரு issue அல்லது PR இல் commentஉங்கள் comment இல் /dropstone ஐ குறிப்பிடவும். Dropstone context ஐ படித்து branches ஐ உருவாக்கலாம், PRs ஐ திறக்கலாம், அல்லது பதிலளிக்கலாம்.
pull_request_review_commentPR இல் specific code lines இல் commentCode ஐ review செய்யும் போது /dropstone ஐ குறிப்பிடவும். Dropstone file path, line numbers, மற்றும் diff context ஐ பெறுகிறது.
issuesIssue opened அல்லது editedIssues ஐ உருவாக்கும் அல்லது modify செய்யும் போது Dropstone ஐ automatically trigger செய்யவும். prompt input தேவை.
pull_requestPR opened அல்லது updatedPRs ஐ திறக்கும், synchronized செய்யும், அல்லது reopen செய்யும் போது Dropstone ஐ automatically trigger செய்யவும். Automated reviews க்கு பயனுள்ளது.
scheduleCron-based scheduleSchedule இல் Dropstone ஐ இயக்கவும். prompt input தேவை. Output logs மற்றும் PRs க்கு செல்கிறது (comment செய்ய issue இல்லை).
workflow_dispatchGitHub UI இலிருந்து Manual triggerActions tab வழியாக demand இல் Dropstone ஐ trigger செய்யவும். prompt input தேவை. Output logs மற்றும் PRs க்கு செல்கிறது.

Schedule Example

Automated tasks ஐ செய்ய schedule இல் Dropstone ஐ இயக்கவும்:

name: Scheduled Dropstone Task

on:
  schedule:
    - cron: "0 9 * * 1" # Every Monday at 9am UTC

jobs:
  dropstone:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: write
      pull-requests: write
      issues: write
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6
        with:
          persist-credentials: false

      - name: Run Dropstone
        uses: blankline-org/dropstone-cli/github@latest
        env:
          DROPSTONE_API_KEY: ${{ secrets.DROPSTONE_API_KEY }}
        with:
          model: dropstone/dropstone-pro
          prompt: |
            Review the codebase for any TODO comments and create a summary.
            If you find issues worth addressing, open an issue to track them.

Scheduled events க்கு, prompt input தேவை কারণ instructions ஐ extract செய்ய comment இல்லை. Scheduled workflows user context இல்லாமல் இயங்குகிறது permission-check செய்ய, எனவே Dropstone branches அல்லது PRs ஐ உருவாக்க வேண்டுமெனில் workflow contents: write மற்றும் pull-requests: write ஐ வழங்க வேண்டும்.


Pull Request Example

PRs ஐ திறக்கும் அல்லது update செய்யும் போது automatically review செய்யவும்:

name: dropstone-review

on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]

jobs:
  review:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: read
      pull-requests: read
      issues: read
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false
      - uses: blankline-org/dropstone-cli/github@latest
        env:
          DROPSTONE_API_KEY: ${{ secrets.DROPSTONE_API_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          model: dropstone/dropstone-pro
          use_github_token: true
          prompt: |
            Review this pull request:
            - Check for code quality issues
            - Look for potential bugs
            - Suggest improvements

pull_request events க்கு, prompt வழங்கப்படாவிட்டால், Dropstone pull request ஐ review செய்ய defaults.


Issues Triage Example

புதிய issues ஐ automatically triage செய்யவும். இந்த example spam ஐ குறைக்க 30 நாட்களுக்கு பழைய accounts க்கு filter செய்கிறது:

name: Issue Triage

on:
  issues:
    types: [opened]

jobs:
  triage:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: write
      pull-requests: write
      issues: write
    steps:
      - name: Check account age
        id: check
        uses: actions/github-script@v7
        with:
          script: |
            const user = await github.rest.users.getByUsername({
              username: context.payload.issue.user.login
            });
            const created = new Date(user.data.created_at);
            const days = (Date.now() - created) / (1000 * 60 * 60 * 24);
            return days >= 30;
          result-encoding: string

      - uses: actions/checkout@v6
        if: steps.check.outputs.result == 'true'
        with:
          persist-credentials: false

      - uses: blankline-org/dropstone-cli/github@latest
        if: steps.check.outputs.result == 'true'
        env:
          DROPSTONE_API_KEY: ${{ secrets.DROPSTONE_API_KEY }}
        with:
          model: dropstone/dropstone-pro
          prompt: |
            Review this issue. If there's a clear fix or relevant docs:
            - Provide documentation links
            - Add error handling guidance for code examples
            Otherwise, do not comment.

issues events க்கு, prompt input தேவை கारணம் instructions ஐ extract செய்ய comment இல்லை.


Custom prompts

Default prompt ஐ override செய்து உங்கள் workflow க்கு Dropstone இன் behavior ஐ customize செய்யவும்.

- uses: blankline-org/dropstone-cli/github@latest
  with:
    model: dropstone/dropstone-pro
    prompt: |
      Review this pull request:
      - Check for code quality issues
      - Look for potential bugs
      - Suggest improvements

இது specific review criteria, coding standards, அல்லது உங்கள் project க்கு relevant focus areas ஐ enforce செய்ய பயனுள்ளது.


Examples

GitHub இல் Dropstone ஐ எவ்வாறு பயன்படுத்தலாம் என்பதற்கான சில examples.

  • ஒரு issue ஐ விளக்கவும்

    GitHub issue இல் இந்த comment ஐ சேர்க்கவும்.

    /dropstone explain this issue
    

    Dropstone முழு thread ஐ, அனைத்து comments உட்பட, படித்து ஒரு clear explanation உடன் பதிலளிக்கும்.

  • ஒரு issue ஐ சரிசெய்யவும்

    GitHub issue இல், சொல்லவும்:

    /dropstone fix this
    

    Dropstone ஒரு புதிய branch ஐ உருவாக்கும், மாற்றங்களை செயல்படுத்தும், மற்றும் மாற்றங்களுடன் PR ஐ திறக்கும்.

  • PRs ஐ review செய்து மாற்றங்களை செய்யவும்

    GitHub PR இல் பின்வரும் comment ஐ விடவும்.

    /dropstone delete the attachment from S3 when the note is removed
    

    Dropstone requested change ஐ செயல்படுத்தும் மற்றும் அதை same PR க்கு commit செய்யும்.

  • Specific code lines ஐ review செய்யவும்

    PR இன் "Files" tab இல் code lines இல் directly comment ஐ விடவும். Dropstone automatically file, line numbers, மற்றும் diff context ஐ detect செய்து precise responses ஐ வழங்குகிறது.

    [Comment on specific lines in Files tab]
    /dropstone add error handling here
    

    Specific lines இல் comment செய்யும் போது, Dropstone பெறுகிறது:

    • Review செய்யப்படும் exact file
    • Code இன் specific lines
    • Surrounding diff context
    • Line number information

    இது file paths அல்லது line numbers ஐ manually specify செய்ய வேண்டாமல் more targeted requests ஐ அனுமதிக்கிறது.

Ctrl+I