forked from hellohublot/react-native-kline-view
-
Notifications
You must be signed in to change notification settings - Fork 1
Serve as package #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b59d47e
added codeowners and PR template
snowtema b8b1f21
Merge pull request #1 from elliottech/codeowners
snowtema 3e126eb
Serve repo as a package
felipe-lighter 8f77bb9
Remove slack notifications
felipe-lighter b235c47
Update CODEOWNERS
felipe-lighter bf2ea3c
Update token
felipe-lighter 83c5dfc
Token update
felipe-lighter 5fb0f61
Resolve conflicts
felipe-lighter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| * @furkando @NGabuaeva @EdiOanceaV2 @sinantalhakosar @rturtu @hikmet-demir @Matteoverzotti @robertbarbu27 | ||
| * @furkando @NGabuaeva @EdiOanceaV2 @sinantalhakosar @rturtu @hikmet-demir @Matteoverzotti @robertbarbu27 @felipe-lighter |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "npm" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| patch-updates: | ||
| applies-to: version-updates | ||
| patterns: ['*'] | ||
| update-types: | ||
| - "patch" | ||
| open-pull-requests-limit: 1 | ||
| target-branch: "main" | ||
| pull-request-branch-name: | ||
| separator: "-" | ||
| commit-message: | ||
| prefix: "[dependabot] Patch update: " | ||
| ignore: | ||
| - dependency-name: "react" | ||
| - dependency-name: "react-native" | ||
| # For all packages, ignore all minor and major updates | ||
| - dependency-name: "*" | ||
| update-types: ["version-update:semver-major", "version-update:semver-minor"] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| name: Cleanup Prereleases | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| cleanup: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.merged == true | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Set NPM_TOKEN for GitHub Packages | ||
| run: echo "NPM_TOKEN=${{ secrets.GH_PACKAGE_TOKEN }}" >> $GITHUB_ENV | ||
|
|
||
| # Setup Node.js and npm | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22.19.0" | ||
| registry-url: 'https://npm.pkg.github.com' | ||
| scope: '@elliottech' | ||
|
|
||
| # Get PR information | ||
| - name: Get PR information | ||
| id: pr_info | ||
| run: | | ||
| PR_NUMBER=${{ github.event.number }} | ||
| BRANCH_NAME="${{ github.head_ref }}" | ||
|
|
||
| # Clean branch name for npm (same logic as prerelease workflow) | ||
| CLEAN_BRANCH_NAME=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9-]/-/g' | sed 's/--*/-/g' | sed 's/^-\|-$//g') | ||
|
|
||
| echo "PR Number: $PR_NUMBER" | ||
| echo "Branch Name: $BRANCH_NAME" | ||
| echo "Clean Branch Name: $CLEAN_BRANCH_NAME" | ||
|
|
||
| echo "clean_branch_name=$CLEAN_BRANCH_NAME" >> $GITHUB_OUTPUT | ||
| echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT | ||
|
|
||
| # List and unpublish prerelease versions | ||
| - name: Cleanup prerelease versions | ||
| run: | | ||
| CLEAN_BRANCH_NAME="${{ steps.pr_info.outputs.clean_branch_name }}" | ||
|
|
||
| echo "Cleaning up prerelease versions for branch: $CLEAN_BRANCH_NAME" | ||
|
|
||
| # List all versions with the branch tag | ||
| echo "Listing versions with tag: $CLEAN_BRANCH_NAME" | ||
| npm view @elliottech/react-native-kline-view@$CLEAN_BRANCH_NAME || echo "No versions found with tag $CLEAN_BRANCH_NAME" | ||
|
|
||
| # Note: npm unpublish by tag is not reliable, so we'll list what would be cleaned up | ||
| echo "Note: npm unpublish by tag is not reliable" | ||
| echo "Manual cleanup may be needed for tag: $CLEAN_BRANCH_NAME" | ||
|
|
||
| # Also try to unpublish specific prerelease versions that might exist | ||
| # Get current version from package.json to construct prerelease version | ||
| CURRENT_VERSION=$(node -p "require('./package.json').version") | ||
| PRERELEASE_VERSION="${CURRENT_VERSION}-${CLEAN_BRANCH_NAME}.${{ steps.pr_info.outputs.pr_number }}" | ||
|
|
||
| echo "Attempting to unpublish specific version: $PRERELEASE_VERSION" | ||
| npm unpublish @elliottech/react-native-kline-view@$PRERELEASE_VERSION || echo "Version $PRERELEASE_VERSION not found or already unpublished" | ||
|
|
||
| echo "Cleanup completed for branch: $CLEAN_BRANCH_NAME" | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }} | ||
|
|
||
| # Comment on the merged PR | ||
| - name: Comment on merged PR | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const cleanBranchName = '${{ steps.pr_info.outputs.clean_branch_name }}'; | ||
| const prNumber = ${{ steps.pr_info.outputs.pr_number }}; | ||
|
|
||
| const comment = `## 🧹 Prerelease Cleanup Complete | ||
|
|
||
| All prerelease versions for branch \`${cleanBranchName}\` have been cleaned up. | ||
|
|
||
| The following actions were performed: | ||
| - ✅ Unpublished all versions tagged with \`${cleanBranchName}\` | ||
| - ✅ Removed prerelease packages from npm registry | ||
|
|
||
| --- | ||
| *This cleanup was performed automatically after PR merge.*`; | ||
|
|
||
| await github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: prNumber, | ||
| body: comment | ||
| }); | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| name: Manual Prerelease Cleanup | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| branch_name: | ||
| description: 'Branch name to clean up (without special characters)' | ||
| required: true | ||
| type: string | ||
| pr_number: | ||
| description: 'PR number (optional, for specific version cleanup)' | ||
| required: false | ||
| type: string | ||
|
|
||
| jobs: | ||
| manual-cleanup: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Set NPM_TOKEN for GitHub Packages | ||
| run: echo "NPM_TOKEN=${{ secrets.GH_PACKAGE_TOKEN }}" >> $GITHUB_ENV | ||
|
|
||
| # Setup Node.js and npm | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22.19.0" | ||
| registry-url: 'https://npm.pkg.github.com' | ||
| scope: '@elliottech' | ||
|
|
||
| # Clean branch name | ||
| - name: Clean branch name | ||
| id: clean_name | ||
| run: | | ||
| BRANCH_NAME="${{ github.event.inputs.branch_name }}" | ||
| CLEAN_BRANCH_NAME=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9-]/-/g' | sed 's/--*/-/g' | sed 's/^-\|-$//g') | ||
| echo "Original branch name: $BRANCH_NAME" | ||
| echo "Clean branch name: $CLEAN_BRANCH_NAME" | ||
| echo "clean_branch_name=$CLEAN_BRANCH_NAME" >> $GITHUB_OUTPUT | ||
|
|
||
| # List and cleanup prerelease versions | ||
| - name: List and cleanup prerelease versions | ||
| run: | | ||
| CLEAN_BRANCH_NAME="${{ steps.clean_name.outputs.clean_branch_name }}" | ||
| PR_NUMBER="${{ github.event.inputs.pr_number }}" | ||
|
|
||
| echo "Cleaning up prerelease versions for branch: $CLEAN_BRANCH_NAME" | ||
|
|
||
| # List all versions with the branch tag | ||
| echo "=== Listing versions with tag: $CLEAN_BRANCH_NAME ===" | ||
| npm view @elliottech/react-native-kline-view@$CLEAN_BRANCH_NAME || echo "No versions found with tag $CLEAN_BRANCH_NAME" | ||
|
|
||
| # Unpublish all versions with this tag | ||
| echo "=== Unpublishing versions with tag: $CLEAN_BRANCH_NAME ===" | ||
| npm unpublish @elliottech/react-native-kline-view@$CLEAN_BRANCH_NAME || echo "No versions to unpublish with tag $CLEAN_BRANCH_NAME" | ||
|
|
||
| # If PR number is provided, also try to unpublish specific version | ||
| if [ -n "$PR_NUMBER" ]; then | ||
| CURRENT_VERSION=$(node -p "require('./package.json').version") | ||
| PRERELEASE_VERSION="${CURRENT_VERSION}-${CLEAN_BRANCH_NAME}.${PR_NUMBER}" | ||
|
|
||
| echo "=== Attempting to unpublish specific version: $PRERELEASE_VERSION ===" | ||
| npm unpublish @elliottech/react-native-kline-view@$PRERELEASE_VERSION || echo "Version $PRERELEASE_VERSION not found or already unpublished" | ||
felipe-lighter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| fi | ||
|
|
||
| echo "=== Cleanup completed for branch: $CLEAN_BRANCH_NAME ===" | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }} | ||
|
|
||
| # Show cleanup summary | ||
| - name: Show cleanup summary | ||
| run: | | ||
| echo "## 🧹 Manual Cleanup Summary" | ||
| echo "**Branch:** ${{ github.event.inputs.branch_name }}" | ||
| echo "**Clean Branch Name:** ${{ steps.clean_name.outputs.clean_branch_name }}" | ||
| echo "**PR Number:** ${{ github.event.inputs.pr_number || 'Not specified' }}" | ||
| echo "" | ||
| echo "✅ Cleanup completed successfully!" | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.