Add org-wide cleanup scripts and comprehensive operator guide for workshop mirroring and Devin Enterprise management#2
Closed
devin-ai-integration[bot] wants to merge 12 commits into
Conversation
…ion, and old PR closure Scripts: - sanitize-pr-pii.sh: Remove 'Requested by' PII from PR descriptions and comments - delete-stale-branches.sh: Delete branches with no commits in N weeks (default 3) - close-old-prs.sh: Close open PRs older than N weeks (default 3) - cleanup-all.sh: Run all three in sequence All scripts are parameterized for any GitHub org and support --dry-run mode. Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
- Use [[:space:]]+ in sed patterns to handle multi-space/tab between 'Requested' and 'by' (matches what has_pii detects with \s+) - Narrow has_pii to only match @username and email patterns inline, since standalone full lines are already deleted by sed #1 regardless of format. Prevents false-success on plain-name inline patterns. Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
has_pii used grep -Pi (case-insensitive) while sanitize_text sed patterns only handle [Rr]equested [Bb]y. Removing -i aligns detection scope with cleaning scope, preventing false-success on unusual casings like REQUESTED BY. Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
…event lifecycle, workshop content, participant management - mirror-github-org.sh: Mirror all repos between GitHub orgs with filtering - setup-devin-org.sh: Create/configure a Devin org per event via /v3 API - manage-event-lifecycle.sh: Full lifecycle management (create/status/teardown) - setup-repos-on-devin.sh: Trigger Devin sessions to set up repos - invite-participants.sh: Invite users to Devin Enterprise org - docs/01-05: Step-by-step guides for the complete workflow - README.md: Rewritten as comprehensive operator guide Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
…8601 for torn_down_at Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
…, strip workflows from all branches Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
…uide - .github/workflows/pr-pii-check.yml: GitHub Actions workflow that fails if PR descriptions or comments contain 'Requested by' PII patterns - scripts/deploy-pr-pii-check.sh: Deploy the workflow to all repos in an org - docs/06-pr-pii-enforcement.md: Guide for CI checks, branch protection, and org-level rulesets Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
The Devin system auto-appends 'Requested by: @user' to PR descriptions. Strip the footer (session link, requester, review badge) before checking so only user-authored PII triggers a failure. Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
- Remove 'edited' trigger to avoid race with system re-appending metadata - Remove 'issue_comment' trigger (redundant with review comments) - Add \r stripping for Windows-style line endings - Use printf instead of echo for special character safety - Add explicit 'Requested by:' line removal as belt-and-suspenders Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
The grep pattern now anchors to ^ so inline references like '"Requested by" PII' in documentation don't trigger false positives. Only actual PII lines (starting with 'Requested by:') are flagged. Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
- sanitize-pr-pii.sh: Add fourth sed to strip inline plain-name PII so sanitize_text scope matches has_pii detection scope - mirror-github-org.sh: Restore HEAD to default_branch after workflow stripping loop so bare clone inherits the correct default branch - mirror-github-org.sh + deploy-pr-pii-check.sh: Accumulate multiple --include/--exclude flags via pipe-delimited patterns instead of silently overwriting with the last value Co-Authored-By: Brian Smitches <smitheitches@gmail.com>
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
Transforms the operator repo into a complete guide for cloning and running Cognition Partner Workshops in your own GitHub org and Devin Enterprise.
New scripts (6):
mirror-github-org.sh— Mirror repos between GitHub orgs (filtering, dry-run, workflow stripping)setup-devin-org.sh— Create a Devin Enterprise org per event via /v3 APImanage-event-lifecycle.sh— Full lifecycle: create (org + git access + invites), status, teardownsetup-repos-on-devin.sh— Trigger Devin sessions to install deps and capture env configsinvite-participants.sh— Batch-invite users with role assignmentdeploy-pr-pii-check.sh— Deploy PII check workflow to all repos in an orgCleanup scripts (4):
sanitize-pr-pii.sh,delete-stale-branches.sh,close-old-prs.sh,cleanup-all.shPR enforcement:
.github/workflows/pr-pii-check.yml— CI check that fails if PRs contain "Requested by" PII. Strips system-appended metadata footer to avoid false positives.Documentation (6 guides): Mirroring, Devin Enterprise setup, event lifecycle, workshop content composition, participant management, PR PII enforcement.
README rewrite: Quick start, architecture diagram, prerequisites, API reference, script reference tables.
Review & Testing Checklist for Human
mirror-github-org.shwith--dry-runagainst a small test org to verify repo listing and filteringmanage-event-lifecycle.sh createwith a test event using yourDEVIN_API_KEYandgit-connection-iddocs/06-pr-pii-enforcement.md)Notes
https://api.devin.ai). For custom enterprise domains, pass--api-url=https://api.your-company.devinenterprise.com.sanitize-pr-pii.shscript handles cleanup of the footer on existing PRs.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/eed3d8907cb74e40a6d69e21bb269ac9
Requested by: @bsmitches