Skip to content

Improve Labeler Action Documentation and Error Handling for Permissions#897

Merged
HarithaVattikuti merged 6 commits intoactions:mainfrom
chiranjib-swain:feature/issue_870
Sep 19, 2025
Merged

Improve Labeler Action Documentation and Error Handling for Permissions#897
HarithaVattikuti merged 6 commits intoactions:mainfrom
chiranjib-swain:feature/issue_870

Conversation

@chiranjib-swain
Copy link
Copy Markdown
Contributor

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: write and issues: write), added an example workflow configuration, and provided an alternative for manual label creation to avoid granting issues: write permission.

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:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings August 22, 2025 12:28
@chiranjib-swain chiranjib-swain requested a review from a team as a code owner August 22, 2025 12:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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: write permission

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.

Comment thread src/labeler.ts Outdated
Comment thread README.md Outdated
@HarithaVattikuti HarithaVattikuti merged commit 25abb3c into actions:main Sep 19, 2025
7 checks passed
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 [@&#8203;bluca](https://github.com/bluca) in [#&#8203;923](actions/labeler#923)

#### Bug Fixes

- Improve Labeler Action documentation and permission error handling by [@&#8203;chiranjib-swain](https://github.com/chiranjib-swain) in [#&#8203;897](actions/labeler#897)
- Preserve manually added labels during workflow runs and refine label synchronization logic by [@&#8203;chiranjib-swain](https://github.com/chiranjib-swain) in [#&#8203;917](actions/labeler#917)

#### Dependency Updates

- Upgrade brace-expansion from 1.1.11 to 1.1.12 and document breaking changes in v6 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;877](actions/labeler#877)
- Upgrade minimatch from 10.0.1 to 10.2.3 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;926](actions/labeler#926)
- Upgrade dependencies ([@&#8203;actions/core](https://github.com/actions/core), [@&#8203;actions/github](https://github.com/actions/github), js-yaml, minimatch, [@&#8203;typescript-eslint](https://github.com/typescript-eslint)) by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;934](actions/labeler#934)

#### New Contributors

- [@&#8203;chiranjib-swain](https://github.com/chiranjib-swain) made their first contribution in [#&#8203;897](actions/labeler#897)
- [@&#8203;bluca](https://github.com/bluca) made their first contribution in [#&#8203;923](actions/labeler#923)
- [@&#8203;Copilot](https://github.com/Copilot) made their first contribution in [#&#8203;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
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.

5 participants