-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
build: add support for /stdlib todo slash command
#12014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
5677fb0
feat: add support for `/stdlib todo` slash command
anandkaranubc 7bf24b8
Merge branch 'develop' into stdlib-todo-bot
anandkaranubc d62e280
Merge branch 'develop' into stdlib-todo-bot
anandkaranubc 2cce346
chore: require org membership
anandkaranubc 572ac55
chore: use a reusable workflow
anandkaranubc 92f0294
chore: move logic to a script
anandkaranubc b3b6379
Merge branch 'develop' into stdlib-todo-bot
anandkaranubc cdbb42c
chore: restore accidentally deleted tsconfig.json
anandkaranubc bc4dd12
feat: add support for `/stdlib todo` slash command on commits
anandkaranubc fd8cfc0
refactor: use source_type and source_ref inputs instead of two option…
anandkaranubc d0aaee8
fix: error body
anandkaranubc ab4b3ed
chore: restore comment update
anandkaranubc 6cb9d18
chore: update copyright years
anandkaranubc d1a70e2
chore: order variable names by length
anandkaranubc ad9dcf2
fix: support arbitrary issue tag prefixes
anandkaranubc 30e1e16
fix: verify commenter membership before processing comment body
anandkaranubc c5eb660
fix: remove inaccessible secret fallback
anandkaranubc 5ac79f4
chore: update copyright years
anandkaranubc a5c351d
Merge branch 'develop' into stdlib-todo-bot
anandkaranubc a3bcdb4
chore: follow project conventions
anandkaranubc 7b570a1
chore: follow project conventions
anandkaranubc 298ff5b
chore: follow project conventions
anandkaranubc fc87d75
Apply suggestions from code review
kgryte 9887bb2
Apply suggestions from code review
kgryte 4e7d313
Merge branch 'develop' into stdlib-todo-bot
anandkaranubc aac20eb
chore: apply suggestions from review
anandkaranubc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| #/ | ||
| # @license Apache-2.0 | ||
| # | ||
| # Copyright (c) 2024 The Stdlib Authors. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| #/ | ||
|
|
||
| # Workflow name: | ||
| name: create_todo_issue | ||
|
|
||
| # Workflow triggers: | ||
| on: | ||
| # Allow the workflow to be triggered by other workflows: | ||
| workflow_call: | ||
| # Define the input parameters for the workflow: | ||
| inputs: | ||
| source_type: | ||
| description: 'Source context type: ''pr'' (pull request comment) or ''commit'' (commit comment)' | ||
| required: true | ||
| type: string | ||
| source_ref: | ||
| description: 'Pull request number when source_type is ''pr''; commit SHA when source_type is ''commit''' | ||
| required: true | ||
| type: string | ||
| comment_body: | ||
| description: 'Body of the slash command comment' | ||
| required: true | ||
| type: string | ||
| user: | ||
| description: 'GitHub login of the commenter' | ||
| required: true | ||
| type: string | ||
|
|
||
| # Define the secrets accessible by the workflow: | ||
| secrets: | ||
| STDLIB_BOT_GITHUB_TOKEN: | ||
| description: 'stdlib-bot GitHub token with permission to create issues and comments' | ||
| required: true | ||
|
|
||
| # Allow the workflow to be manually triggered: | ||
| workflow_dispatch: | ||
| inputs: | ||
| source_type: | ||
| description: 'Source context type: ''pr'' (pull request comment) or ''commit'' (commit comment)' | ||
| required: true | ||
| type: string | ||
| source_ref: | ||
| description: 'Pull request number when source_type is ''pr''; commit SHA when source_type is ''commit''' | ||
| required: true | ||
| type: string | ||
| comment_body: | ||
| description: 'Body of the slash command comment' | ||
| required: true | ||
| type: string | ||
| user: | ||
| description: 'GitHub login of the commenter' | ||
| required: true | ||
| type: string | ||
|
|
||
| # Workflow jobs: | ||
| jobs: | ||
|
|
||
| # Define a job for creating a new todo issue: | ||
| create_todo_issue: | ||
|
|
||
| # Define a display name: | ||
| name: 'Create a new todo issue' | ||
|
|
||
| # Define the type of virtual host machine: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| # Define the job's steps: | ||
| steps: | ||
| # Checkout the repository: | ||
| - name: 'Checkout repository' | ||
| # Pin action to full length commit SHA | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| # Ensure we have access to the scripts directory: | ||
| sparse-checkout: | | ||
| .github/workflows/scripts | ||
| sparse-checkout-cone-mode: false | ||
| timeout-minutes: 10 | ||
|
|
||
| # Create a new todo issue: | ||
| - name: 'Create a new todo issue' | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN || secrets.STDLIB_BOT_PAT_REPO_WRITE }} | ||
| COMMENT_BODY: ${{ inputs.comment_body }} | ||
| COMMENTER: ${{ inputs.user }} | ||
| SOURCE_TYPE: ${{ inputs.source_type }} | ||
| SOURCE_REF: ${{ inputs.source_ref }} | ||
| run: | | ||
| . "$GITHUB_WORKSPACE/.github/workflows/scripts/create_todo_issue/run" | ||
| timeout-minutes: 10 | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.