Skip to content

Conversation

vidipsingh
Copy link
Contributor

@vidipsingh vidipsingh commented Mar 13, 2025

User description

User description

  • This PR updates the assign-issues.yml workflow to support the timed bounty feature requested in issue Have the ability to set a timed bounty on an issue #3883.
  • It adds a script to parse bounty-amount and bounty-hours from the issue body and includes the required repository input for the BLT-Action.

Fixes: #3883


PR Type

enhancement, configuration changes


Description

  • Added support for timed bounty in assign-issues.yml.

  • Introduced parsing of bounty-amount and bounty-hours from issue body.

  • Updated BLT-Action configuration with new inputs.


Changes walkthrough 📝

Relevant files
Configuration changes
assign-issues.yml
Add timed bounty parsing to workflow                                         

.github/workflows/assign-issues.yml

  • Added bounty-amount input to parse bounty value.
  • Added bounty-hours input to set bounty duration.
  • Updated BLT-Action step with new inputs.
  • +2/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • Summary by CodeRabbit

    • New Features
      • Enhanced the automated issue assignment process with new configurable options for bounty details. These improvements now allow setting a bounty value and a corresponding time duration, with sensible defaults applied when no specific values are provided.

    @DonnieBLT
    Copy link
    Collaborator

    Can you show the screenshots of it working please?

    @vidipsingh
    Copy link
    Contributor Author

    Can you show the screenshots of it working please?

    Hi @DonnieBLT, could you please guide me on how to simulate this action?

    @igennova
    Copy link
    Contributor

    Can you show the screenshots of it working please?

    Hi @DonnieBLT, could you please guide me on how to simulate this action?

    bro u can go to github developer setting and can create client secret key and token
    and then try it within your localhost

    Copy link
    Contributor

    coderabbitai bot commented Mar 15, 2025

    Walkthrough

    This change updates the GitHub Actions workflow in the .github/workflows/assign-issues.yml file by introducing two new parameters into the OWASP-BLT/BLT-Action step of the auto-assign job. The parameters, bounty-amount and bounty-hours, are set using values from the issue body with fallback defaults of 0 and 24, respectively.

    Changes

    File Path Change Summary
    .github/workflows/assign-issues.yml Added bounty-amount and bounty-hours parameters to the OWASP-BLT/BLT-Action step in the auto-assign job.

    Sequence Diagram(s)

    sequenceDiagram
        participant IssueCreator as Issue Creator
        participant Workflow as GitHub Actions Workflow
        participant BLTAction as OWASP-BLT Action
    
        IssueCreator->>Workflow: Create issue (with bounty details)
        Workflow-->>BLTAction: Trigger auto-assign job with bounty-amount (from issue or 0) and bounty-hours (from issue or 24)
        BLTAction-->>Workflow: Process issue with bounty parameters
    
    Loading

    Poem

    Hop along with me, through lines of code so bright,
    New parameters spring forth in the pale moonlight.
    Bounty values hop in, defaults keeping order,
    In our workflow garden, peace nibbles every border.
    A cheerful rabbit sings to code with pure delight!

    Tip

    ⚡🧪 Multi-step agentic review comment chat (experimental)
    • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
      - To enable this feature, set early_access to true under in the settings.

    🪧 Tips

    Chat

    There are 3 ways to chat with CodeRabbit:

    • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
      • I pushed a fix in commit <commit_id>, please review it.
      • Generate unit testing code for this file.
      • Open a follow-up GitHub issue for this discussion.
    • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
      • @coderabbitai generate unit testing code for this file.
      • @coderabbitai modularize this function.
    • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
      • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
      • @coderabbitai read src/utils.ts and generate unit testing code.
      • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
      • @coderabbitai help me debug CodeRabbit configuration file.

    Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

    CodeRabbit Commands (Invoked using PR comments)

    • @coderabbitai pause to pause the reviews on a PR.
    • @coderabbitai resume to resume the paused reviews.
    • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
    • @coderabbitai full review to do a full review from scratch and review all the files again.
    • @coderabbitai summary to regenerate the summary of the PR.
    • @coderabbitai generate docstrings to generate docstrings for this PR.
    • @coderabbitai resolve resolve all the CodeRabbit review comments.
    • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
    • @coderabbitai help to get help.

    Other keywords and placeholders

    • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
    • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
    • Add @coderabbitai anywhere in the PR title to generate the title automatically.

    CodeRabbit Configuration File (.coderabbit.yaml)

    • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
    • Please see the configuration documentation for more information.
    • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

    Documentation and Community

    • Visit our Documentation for detailed information on how to use CodeRabbit.
    • Join our Discord Community to get help, request features, and share feedback.
    • Follow us on X/Twitter for updates and announcements.

    Copy link
    Contributor

    @coderabbitai coderabbitai bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Actionable comments posted: 0

    🧹 Nitpick comments (1)
    .github/workflows/assign-issues.yml (1)

    20-21: Validate Timed Bounty Parameter Parsing

    The new parameters bounty-amount and bounty-hours are correctly added with fallback defaults (0 and 24 respectively). Please verify that the BLT-Action’s internal logic correctly parses these values from the issue body. Since the issue body is a string, ensure that the use of the logical OR (||) operator appropriately handles cases where the expected properties might be missing or falsy. It may also be beneficial to update the documentation to specify the required format for these values.

    📜 Review details

    Configuration used: CodeRabbit UI
    Review profile: CHILL
    Plan: Pro

    📥 Commits

    Reviewing files that changed from the base of the PR and between d3d226b and 984ae69.

    📒 Files selected for processing (1)
    • .github/workflows/assign-issues.yml (1 hunks)
    ⏰ Context from checks skipped due to timeout of 90000ms (4)
    • GitHub Check: Run Tests
    • GitHub Check: docker-test
    • GitHub Check: Analyze (python)
    • GitHub Check: Analyze (javascript-typescript)

    @OWASP-BLT OWASP-BLT deleted a comment from github-actions bot Mar 16, 2025
    @OWASP-BLT OWASP-BLT deleted a comment from github-actions bot Mar 16, 2025
    @DonnieBLT
    Copy link
    Collaborator

    /giphy try again

    @DonnieBLT DonnieBLT closed this Mar 20, 2025
    Copy link
    Contributor

    Giphy GIF

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    Have the ability to set a timed bounty on an issue
    3 participants