-
Notifications
You must be signed in to change notification settings - Fork 2
Revert "CU-869az43jq: MedCAT v2: Distribute cogstack-es and medcat-scripts" #7
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
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 |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: submodules-sync | ||
|
|
||
| on: | ||
| push: | ||
| branches: ['**'] | ||
| tags: ['v*.*.*'] | ||
| pull_request: | ||
| branches: ['**'] | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| sync: | ||
| name: 'Submodules Sync' | ||
| runs-on: ubuntu-22.04 | ||
| if: github.actor != 'github-actions[bot]' | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| steps: | ||
| - name: Checkout repository with submodules | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| submodules: recursive | ||
| persist-credentials: false | ||
|
|
||
| - name: Sync submodule URLs | ||
| run: | | ||
| git submodule sync --recursive | ||
|
|
||
| - name: Update submodules | ||
| run: | | ||
| git -c protocol.version=2 submodule update --init --remote --recursive --jobs 8 | ||
|
|
||
| - name: Commit and push submodule updates | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| git config user.name 'github-actions[bot]' | ||
| git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
| git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }} | ||
| # Stage only submodule pointer updates and .gitmodules | ||
| git add .gitmodules $(git config -f .gitmodules --get-regexp path | awk '{print $2}') || true | ||
| if git diff --cached --quiet; then | ||
| echo "No submodule pointer changes to commit" | ||
| exit 0 | ||
| fi | ||
| git commit -m "chore(submodules): auto-update pointers [skip ci]" | ||
| git push | ||
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,6 @@ | ||
|
|
||
| [submodule "notebooks/demo_working_with_cogstack"] | ||
| path = notebooks/demo_working_with_cogstack | ||
| url = https://github.com/CogStack/working_with_cogstack.git | ||
| branch = main | ||
| ignore = all |
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
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,6 +1,4 @@ | ||
| wheel==0.45.1 | ||
| medcat==2.2.0 | ||
| # TODO: cogstack-es | ||
| virtualenv==20.31.2 | ||
| ipywidgets==8.1.7 | ||
| requests>=2.32.2 | ||
|
|
||
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.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 30 days ago
To fix the problem, we must add a
permissions:block to the workflow to restrict the GitHub ActionsGITHUB_TOKENpermissions as tightly as possible, following the principle of least privilege. The workflow commits changes and pushes updates, so it needscontents: write, but no other elevated permissions. This block should be added either at the workflow root (top level) or at the job level; since there is only one job shown, either approach is fine. The simplest fix is to add the following block near the top (beforejobs:):This will ensure that the workflow has only the necessary permissions for repository contents and disallow unnecessary privileges.