diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1524126..72955fd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,8 +26,42 @@ jobs: steps: - uses: actions/checkout@v4 with: + ref: main fetch-depth: 0 + - name: Bump version and push tag + uses: anothrNick/github-tag-action@1.64.0 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + WITH_V: false + + - name: Set up Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + - name: Install git-chglog + run: | + curl -LO https://github.com/git-chglog/git-chglog/releases/download/v0.15.4/git-chglog_0.15.4_linux_386.tar.gz + tar -xzf git-chglog_0.15.4_linux_386.tar.gz + chmod +x git-chglog + sudo mv git-chglog /usr/local/bin/ + git-chglog --version + + - name: Generate HISTORY.md + run: | + git-chglog -o HISTORY.md + cat HISTORY.md + + - name: Commit and Push + run: | + if git diff --exit-code HISTORY.md; then + echo "No changelog update needed" + else + git add HISTORY.md + git commit -m "chore: update HISTORY.md for ${{ github.ref_name }}" + git push + fi - name: Set up Python 3.11 uses: actions/setup-python@v5 diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 614c40b..fbd2a56 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -27,52 +27,6 @@ jobs: python-version: ["3.11"] steps: - uses: actions/checkout@v4 - with: - ref: staging - fetch-depth: 0 - - - name: Extract bump type from PR title - id: bump - run: | - BUMP_TYPE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH" | grep -Eo "#(patch|minor|major)" | head -n1 || echo "#patch") - echo "bump_type=${BUMP_TYPE/#/}" >> $GITHUB_OUTPUT - - - name: Bump version and push tag - uses: anothrNick/github-tag-action@1.64.0 - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - DEFAULT_BUMP: ${{ steps.bump.outputs.bump_type }} - RELEASE_BRANCHES: staging - PATCH_STRING_TOKEN: "#patch" - MINOR_STRING_TOKEN: "#minor" - MAJOR_STRING_TOKEN: "#major" - WITH_V: false - - - name: Set up Git - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - - - name: Install git-chglog - run: | - curl -LO https://github.com/git-chglog/git-chglog/releases/download/v0.15.4/git-chglog_0.15.4_linux_386.tar.gz - tar -xzf git-chglog_0.15.4_linux_386.tar.gz - chmod +x git-chglog - sudo mv git-chglog /usr/local/bin/ - git-chglog --version - - - name: Generate HISTORY.md - run: git-chglog -o HISTORY.md - - - name: Commit and Push - run: | - if git diff --exit-code HISTORY.md; then - echo "No changelog update needed" - else - git add HISTORY.md - git commit -m "chore: update HISTORY.md for ${{ github.ref_name }}" - git push - fi - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 diff --git a/cortexapps_cli/commands/integrations_commands/github.py b/cortexapps_cli/commands/integrations_commands/github.py index 710bf40..3c41486 100644 --- a/cortexapps_cli/commands/integrations_commands/github.py +++ b/cortexapps_cli/commands/integrations_commands/github.py @@ -79,6 +79,7 @@ def get( r = client.get("api/v1/github/configurations/app/" + alias) print_json(data=r) + @app.command() def get_personal( ctx: typer.Context,