-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add silent option * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add action and workflow to remove changelog silent entry * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Make the CI happier * Add unit test for remove placeholder * Fix typing * TO REMOVE point to the current branch * Fix logic to silent the entry in the changelog only when releasing * Don't get the changelog for silent GH release in populate release * Debug populate-release * Don't request metadata uselessly * Ignore release missing known tagged released * Fix removing placeholder in changelong * Remove debug log * Revert "TO REMOVE point to the current branch" This reverts commit 7531de1. * Add documentation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Don't print the changelog in the job log if the release is silent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix mypy errors * Add ruff exception * [skip ci] Comment new flag silent * [skip ci] Comment new flag in example * Fix doc --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
- Loading branch information
1 parent
cb677f5
commit d77acfd
Showing
22 changed files
with
545 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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 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,49 @@ | ||
name: "Publish Changelog" | ||
description: "Remove silent placeholder entries in the changelog file." | ||
inputs: | ||
token: | ||
description: "GitHub access token" | ||
required: true | ||
target: | ||
description: "The owner/repo GitHub target" | ||
required: true | ||
branch: | ||
description: "The branch to target" | ||
required: false | ||
dry_run: | ||
description: "If set, do not make a PR" | ||
default: "false" | ||
required: false | ||
outputs: | ||
pr_url: | ||
description: "The html URL of the draft GitHub release" | ||
value: ${{ steps.publish-changelog.outputs.pr_url }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: install-releaser | ||
shell: bash -eux {0} | ||
run: | | ||
# Install Jupyter Releaser from git unless we are testing Releaser itself | ||
if ! command -v jupyter-releaser &> /dev/null | ||
then | ||
pip install -q git+https://github.com/jupyter-server/jupyter_releaser.git@v2 | ||
fi | ||
- id: publish-changelog | ||
shell: bash -eux {0} | ||
run: | | ||
export GITHUB_ACCESS_TOKEN=${{ inputs.token }} | ||
export GITHUB_ACTOR=${{ github.triggering_actor }} | ||
export RH_REPOSITORY=${{ inputs.target }} | ||
if [ ! -z ${{ inputs.branch }} ]; then | ||
export RH_BRANCH=${{ inputs.branch }} | ||
fi | ||
export RH_DRY_RUN=${{ inputs.dry_run }} | ||
python -m jupyter_releaser.actions.publish_changelog | ||
- shell: bash -eux {0} | ||
run: | | ||
echo "## Next Step" >> $GITHUB_STEP_SUMMARY | ||
echo "Merge the changelog update PR: ${{ steps.publish-changelog.outputs.pr_url }}" >> $GITHUB_STEP_SUMMARY |
This file contains 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 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,35 @@ | ||
name: "Publish Changelog" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
token: | ||
description: "GitHub access token" | ||
required: true | ||
target: | ||
description: "The owner/repo GitHub target" | ||
required: true | ||
branch: | ||
description: "The branch to target" | ||
required: false | ||
|
||
jobs: | ||
publish_changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- name: Install Dependencies | ||
shell: bash | ||
run: | | ||
pip install -e . | ||
- name: Publish changelog | ||
id: publish-changelog | ||
uses: jupyter-server/jupyter_releaser/.github/actions/publish-changelog@v2 | ||
with: | ||
token: ${{ secrets.ADMIN_GITHUB_TOKEN }} | ||
target: ${{ github.event.inputs.target }} | ||
branch: ${{ github.event.inputs.branch }} | ||
|
||
- name: "** Next Step **" | ||
run: | | ||
echo "Merge the changelog update PR: ${{ steps.publish-changelog.outputs.pr_url }}" |
This file contains 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 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 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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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 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,29 @@ | ||
name: "Publish Changelog" | ||
on: | ||
release: | ||
types: [published] | ||
|
||
workflow_dispatch: | ||
inputs: | ||
token: | ||
description: "GitHub access token" | ||
required: true | ||
branch: | ||
description: "The branch to target" | ||
required: false | ||
|
||
jobs: | ||
publish_changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- name: Publish changelog | ||
id: publish-changelog | ||
uses: jupyter-server/jupyter_releaser/.github/actions/publish-changelog@v2 | ||
with: | ||
token: ${{ secrets.ADMIN_GITHUB_TOKEN }} | ||
branch: ${{ github.event.inputs.branch }} | ||
|
||
- name: "** Next Step **" | ||
run: | | ||
echo "Merge the changelog update PR: ${{ steps.publish-changelog.outputs.pr_url }}" |
This file contains 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,20 @@ | ||
"""Remove silent placeholder entries in the changelog.""" | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
import os | ||
|
||
from jupyter_releaser.actions.common import run_action, setup | ||
from jupyter_releaser.util import CHECKOUT_NAME, get_default_branch | ||
|
||
setup(False) | ||
|
||
run_action("jupyter-releaser prep-git") | ||
|
||
# Handle the branch. | ||
if not os.environ.get("RH_BRANCH"): | ||
cur_dir = os.getcwd() | ||
os.chdir(CHECKOUT_NAME) | ||
os.environ["RH_BRANCH"] = get_default_branch() or "" | ||
os.chdir(cur_dir) | ||
|
||
run_action("jupyter-releaser publish-changelog") |
Oops, something went wrong.