Improve Labeler Action Documentation and Error Handling for Permissions#897
Merged
HarithaVattikuti merged 6 commits intoactions:mainfrom Sep 19, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request improves the GitHub Labeler Action by enhancing documentation clarity around required permissions and implementing better error handling to guide users when permission issues occur. The changes help users understand the distinction between permissions needed for adding existing labels versus creating new labels.
- Enhanced error handling to detect unauthorized errors and provide specific guidance for missing permissions
- Expanded documentation to clarify permission requirements for different use cases
- Added example workflow configuration and alternative solutions for avoiding
issues: writepermission
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/labeler.ts | Added specific error detection for 403 unauthorized errors with detailed guidance on required permissions |
| README.md | Expanded permissions documentation with clearer explanations, example configuration, and manual label creation alternative |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…o granting issues write permission
… access instead of logging
5 tasks
mahabaleshwars
approved these changes
Sep 15, 2025
aparnajyothi-y
approved these changes
Sep 18, 2025
HarithaVattikuti
approved these changes
Sep 19, 2025
2 tasks
eleboucher
pushed a commit
to eleboucher/homelab
that referenced
this pull request
May 6, 2026
…v6.0.1 → v6.1.0) (#384) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [https://github.com/actions/labeler](https://github.com/actions/labeler) | action | minor | `v6.0.1` → `v6.1.0` | --- ### Release Notes <details> <summary>actions/labeler (https://github.com/actions/labeler)</summary> ### [`v6.1.0`](https://github.com/actions/labeler/releases/tag/v6.1.0) [Compare Source](actions/labeler@v6.0.1...v6.1.0) #### Enhancements - Add changed-files-labels-limit and max-files-changed configuration options to cap the number of labels added by [@​bluca](https://github.com/bluca) in [#​923](actions/labeler#923) #### Bug Fixes - Improve Labeler Action documentation and permission error handling by [@​chiranjib-swain](https://github.com/chiranjib-swain) in [#​897](actions/labeler#897) - Preserve manually added labels during workflow runs and refine label synchronization logic by [@​chiranjib-swain](https://github.com/chiranjib-swain) in [#​917](actions/labeler#917) #### Dependency Updates - Upgrade brace-expansion from 1.1.11 to 1.1.12 and document breaking changes in v6 by [@​dependabot](https://github.com/dependabot) in [#​877](actions/labeler#877) - Upgrade minimatch from 10.0.1 to 10.2.3 by [@​dependabot](https://github.com/dependabot) in [#​926](actions/labeler#926) - Upgrade dependencies ([@​actions/core](https://github.com/actions/core), [@​actions/github](https://github.com/actions/github), js-yaml, minimatch, [@​typescript-eslint](https://github.com/typescript-eslint)) by [@​Copilot](https://github.com/Copilot) in [#​934](actions/labeler#934) #### New Contributors - [@​chiranjib-swain](https://github.com/chiranjib-swain) made their first contribution in [#​897](actions/labeler#897) - [@​bluca](https://github.com/bluca) made their first contribution in [#​923](actions/labeler#923) - [@​Copilot](https://github.com/Copilot) made their first contribution in [#​934](actions/labeler#934) **Full Changelog**: <actions/labeler@v6...v6.1.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9naXRodWItYWN0aW9uIiwidHlwZS9taW5vciJdfQ==--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/384
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description:
This pull request updates the GitHub Labeler Action documentation and error handling to clarify required permissions and provide better guidance for resolving issues. The changes include detailed permission requirements, alternative solutions for label creation, and improved error messaging in the code.
Documentation Updates:
README.md: Expanded the explanation of required permissions for adding and creating labels (pull-requests: writeandissues: write), added an example workflow configuration, and provided an alternative for manual label creation to avoid grantingissues: writepermission.Error Handling Improvements:
src/labeler.ts: Enhanced error handling to detect unauthorized errors, provide specific guidance for missing permissions, and improve warning messages with clearer descriptions of required permissions and alternatives.Related issue:
#870
Check list: