fix(SA-675): Add packages write permission and fix Dockerfile CMD#790
Closed
gjarzebak95 wants to merge 8 commits intomainfrom
Closed
fix(SA-675): Add packages write permission and fix Dockerfile CMD#790gjarzebak95 wants to merge 8 commits intomainfrom
gjarzebak95 wants to merge 8 commits intomainfrom
Conversation
- Add query parameter to filter suspended users at API level - Add secondary filter in formatUserList for archived users - Include suspended/archived fields in API response - Add tests for suspended/archived user filtering
Previously, any mismatch would trigger non-zero exit even when ADD_USERS and REMOVE_USERS were enabled and changes were made. Now only exits non-zero when mismatch exists AND changes were not configured to be applied (dry-run mode).
- Add OperationError interface to track individual failures - Add OperationResult interface to collect successes and errors - Wrap GitHub API calls in try/catch blocks - Parse specific error codes (422, 403, 404) with helpful messages - Surface max user count errors (422) clearly - Collect all errors and display summary at end of run - Exit with non-zero when errors occur
- Add slack.ts module with notification functionality - Add config options: SLACK_WEBHOOK_URL, SLACK_NOTIFY_ON_ERROR, SLACK_NOTIFY_ON_CHANGE, SLACK_NOTIFY_ALWAYS - Update action.yml with new Slack inputs - Send notifications on errors (default), changes (opt-in), or always - Format messages with users added, removed, and any errors
Node 15.12.0 was EOL. Updated to Node 18 LTS for security and compatibility. Major npm package updates (octokit, jest, eslint) require careful testing due to breaking API changes and should be addressed in a follow-up PR.
- Remove unused slack import from index.spec.ts - Remove unused consoleSpy variable from slack.spec.ts - Add eslint-disable comments for necessary any types in test mocks
- actions/checkout: v3.5.2 → v4.2.2 - actions/setup-node: v3.6.0 → v4.1.0 - actions/cache: v3.3.1 → v4.2.3 Fixes CI failure due to deprecated actions/cache version being blocked by GitHub as of Dec 2024.
- Add permissions block with packages:write to allow pushing to GitHub Packages registry - Change Dockerfile CMD from shell form to JSON array format to properly handle OS signals
Contributor
Author
|
Closing - created on wrong branch. Will recreate from main. |
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.
Summary
permissionsblock withpackages: writeto allow pushing to GitHub Packages registryProblem
The CI workflow was failing with:
This was due to missing
packages: writepermission on the workflow.Additionally, Docker was warning about the CMD format:
Changes
ci.yml: Added permissions block:
Dockerfile: Changed CMD from shell form to JSON array:
Test Plan