-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: add GitHub Actions workflows for automatic labeling of PRs #3134
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
Closed
Closed
Changes from all commits
Commits
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,58 @@ | ||
| # This file is used by GitHub Actions to automatically label pull requests based on the files changed. | ||
| # See https://github.com/actions/labeler | ||
|
|
||
| # Documentation changes | ||
| documentation: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '**/*.md' | ||
| - 'documentation/**/*' | ||
|
|
||
| # CLI-related changes | ||
| cli: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'crates/goose-cli/**/*' | ||
|
|
||
| # Rust backend changes | ||
| rust: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'crates/**/*' | ||
| - '**/*.rs' | ||
|
|
||
| # UI/Desktop application changes | ||
| ui: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'ui/desktop/**/*' | ||
| - '**/*.tsx' | ||
| - '**/*.ts' | ||
| - '**/*.js' | ||
| - '**/*.jsx' | ||
|
|
||
| # Windows-specific changes | ||
| windows: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - 'ui/desktop/src/platform/windows/**/*' | ||
| - '**/*windows*' | ||
| - '**/*.bat' | ||
| - '**/*.ps1' | ||
|
|
||
| # Dependency updates | ||
| dependencies: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '**/Cargo.toml' | ||
| - '**/Cargo.lock' | ||
| - '**/package.json' | ||
| - '**/package-lock.json' | ||
| - '**/yarn.lock' | ||
| - '**/pnpm-lock.yaml' | ||
|
|
||
|
|
||
| # Demonstration of labeler for initial Pull Request commit | ||
| labeler: | ||
| - changed-files: | ||
| - any-glob-to-any-file: '.github/labeler.yml' | ||
|
Comment on lines
+55
to
+58
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The purpose of adding this was so reviewers could better understand how the labeler works, but it looks like it needs approvals from maintainers to run. https://github.com/block/goose/actions/runs/15937664559 Let me know if I should remove this bit. |
||
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,20 @@ | ||
| name: Add Labels | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened] | ||
|
|
||
| jobs: | ||
| add_labels_on_opened: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Label PR (opened) | ||
| uses: actions/labeler@v5 | ||
| with: | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| configuration-path: .github/labeler.yml | ||
| sync-labels: false |
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,20 @@ | ||
| name: Sync Labels | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [synchronize, reopened] | ||
|
|
||
| jobs: | ||
| sync_labels_on_updated: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Label PR (updated) | ||
| uses: actions/labeler@v5 | ||
| with: | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| configuration-path: .github/labeler.yml | ||
| sync-labels: true |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to call out that the Goose docs are written in typescript, which might not fit under "ui". I'll let others provide their opinions