name: bot-help on: issue_comment: types: [created] jobs: help: if: github.event.comment.user.login != 'openchamber-bot[bot]' && (github.event.comment.body == '@openchamber-bot help' || startsWith(github.event.comment.body, '@openchamber-bot help ')) runs-on: ubuntu-latest permissions: issues: write steps: - name: Generate bot app token id: app-token uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.OC_REVIEW_APP_ID }} private-key: ${{ secrets.OC_REVIEW_APP_PRIVATE_KEY }} - name: Post help env: GH_TOKEN: ${{ steps.app-token.outputs.token }} COMMENT_BODY: ${{ github.event.comment.body }} ISSUE_NUMBER: ${{ github.event.issue.number }} run: | first_line="${COMMENT_BODY%%$'\n'*}" case "$first_line" in "@openchamber-bot help"|"@openchamber-bot help "*) ;; *) echo "Unsupported help command: $first_line" >&2 exit 1 ;; esac gh issue comment "$ISSUE_NUMBER" --body "

OpenChamber Bot Commands

Use one command at the start of a comment. Any text after the command is passed as maintainer focus. - @openchamber-bot review [focus] — review a pull request. - @openchamber-bot summarize [focus] — summarize an issue or pull request discussion. - @openchamber-bot triage [focus] — triage an issue. - @openchamber-bot reproduce [focus] — attempt to reproduce an issue. - @openchamber-bot help — show this help message.

Examples

- @openchamber-bot review please check the latest fix - @openchamber-bot summarize focus on unresolved blockers - @openchamber-bot triage this looks like a Windows desktop regression - @openchamber-bot reproduce try the steps from the latest reporter comment"