Skip to content

Add permission set for reusability#412

Merged
5ouma merged 1 commit intomainfrom
chore-deno-permission-set
Apr 19, 2026
Merged

Add permission set for reusability#412
5ouma merged 1 commit intomainfrom
chore-deno-permission-set

Conversation

@5ouma
Copy link
Copy Markdown
Owner

@5ouma 5ouma commented Apr 19, 2026

⚠️ Issue

close #


✏️ Description

Don't write the same thing multiple times.


Don't write the same thing in multiple times.
Copilot AI review requested due to automatic review settings April 19, 2026 06:13
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Walkthrough

Modified deno.json to introduce a default permissions policy enabling environment access while restricting network access to api.github.com. Updated task commands to use deno serve and deno test with a -P flag, consolidating permission management through the policy configuration instead of explicit flags.

Changes

Cohort / File(s) Summary
Configuration Updates
deno.json
Added default permissions policy restricting network access and enabling environment variable access. Refactored serve, test, start, and dev tasks to use -P flag with the centralized permissions configuration. Removed explicit permission flags from individual task commands.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a reusable permission set in deno.json to avoid repetition across task definitions.
Description check ✅ Passed The description relates to the changeset by explaining the motivation (avoiding repetition) and aligns with the permission set consolidation visible in the code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-deno-permission-set

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the 🔧 Maintenance Repository Maintenance label Apr 19, 2026
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 PR centralizes Deno permission configuration in deno.json so tasks can reuse a shared permission set rather than repeating CLI permission flags.

Changes:

  • Added a default permission set (env + net limited to api.github.com) to deno.json.
  • Updated start, dev, and test tasks to use the permission set via -P, removing repeated inline permission flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@5ouma
Copy link
Copy Markdown
Owner Author

5ouma commented Apr 19, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@deno.json`:
- Around line 9-14: Change the "permissions" block so "env": true is replaced
with an explicit allow-list for the environment variables actually used
(REPOSITORY_OWNER, REPOSITORY_NAME, REPOSITORY_PATH, GITHUB_TOKEN) instead of a
global env grant, and update the "tasks" entries ("start", "dev", "test") that
use the -P flag to remain compatible; also add a short note to the README under
Installation/Requirements stating that Deno 2.5.0+ is required for deno.json
"permissions" and the -P flag, and update CI workflow's setup-deno step to
include an explicit deno-version input to pin to at least 2.5.0.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7eecce66-42e3-471b-a642-115654365354

📥 Commits

Reviewing files that changed from the base of the PR and between 23dd948 and 5423d1f.

📒 Files selected for processing (1)
  • deno.json

Comment thread deno.json
@5ouma 5ouma merged commit 024ed6d into main Apr 19, 2026
15 checks passed
@5ouma 5ouma deleted the chore-deno-permission-set branch April 19, 2026 11:33
@5ouma 5ouma Bot mentioned this pull request Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 Maintenance Repository Maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants