Skip to content

Conversation

@turtleDev
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 25, 2025 18:13
Comment on lines +8 to +25
name: Bump Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set branch name
id: extract_branch
run: echo "::set-output name=branch_name::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})"
- name: Bump version and push tag
id: bump_version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
PRERELEASE: true
RELEASE_BRANCHES: ${{ steps.extract_branch.outputs.branch_name }} No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 4 months ago

To fix the issue, we will add a permissions block at the root of the workflow file. This block will specify the least privileges required for the workflow to function correctly. Based on the workflow's steps, it needs to read repository contents and push tags, which requires contents: write. We will add this block to the top level of the workflow, ensuring it applies to all jobs.


Suggested changeset 1
.github/workflows/bump-version.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml
--- a/.github/workflows/bump-version.yml
+++ b/.github/workflows/bump-version.yml
@@ -2,6 +2,7 @@
 
+permissions:
+  contents: write
+
 on:
   workflow_dispatch:
-    
-jobs:
   bump_version:
EOF
@@ -2,6 +2,7 @@

permissions:
contents: write

on:
workflow_dispatch:

jobs:
bump_version:
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link
Contributor

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

Adds a new GitHub Actions workflow to bump the project version and push a tag on manual dispatch.

  • Introduces a bump-version.yml workflow triggered via workflow_dispatch
  • Extracts the current branch name and uses github-tag-action to bump the version
  • Configures a prerelease bump with a default patch increment
Comments suppressed due to low confidence (1)

.github/workflows/bump-version.yml:16

  • The ::set-output command is deprecated. Use the new workflow command file syntax, e.g.: echo "branch_name=$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/]}})" >> $GITHUB_OUTPUT.
        run: echo "::set-output name=branch_name::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})"

@@ -0,0 +1,25 @@
name: Bump Version

Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

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

Consider explicitly setting permissions: contents: write at the root or job level to ensure the action has the minimum required scope to push tags.

Suggested change
permissions:
contents: write

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants