Skip to content
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

Remove the need for an ADMIN_GITHUB_TOKEN #557

Merged
merged 11 commits into from
Mar 4, 2024

Conversation

blink1073
Copy link
Contributor

@blink1073 blink1073 commented Feb 24, 2024

Fixes #505.

  • Create GitHub Apps for Jupyter Server, JupyterLab, and IPython orgs (Jupyter was already done for nbconvert)
  • Update this repo to use the app for self releases
  • Update self release workflows
  • Update example workflows
  • Update documentation to mention GitHub Apps and Rulesets instead of Admin tokens

@blink1073 blink1073 added the enhancement New feature or request label Feb 24, 2024
@blink1073 blink1073 marked this pull request as ready for review February 25, 2024 13:59
@jtpio
Copy link
Member

jtpio commented Feb 26, 2024

Nice, thanks!

# description: "Set a placeholder in the changelog and don't publish the release."
# required: false
# type: boolean
silent:
Copy link
Member

Choose a reason for hiding this comment

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

iirc this was left commented so that the input does not show up in the UI as this is more of an advanced feature (discussed in #526)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay fair, I'll comment it out

@blink1073 blink1073 requested a review from jtpio February 26, 2024 12:10
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks a lot @blink1073

I have some minor questions and suggestions.

Comment on lines -63 to -66
# The following are needed if you use legacy PyPI set up
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
# PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
# TWINE_USERNAME: __token__
Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this for now as we don't remove legacy PyPI publication yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think having it in the docs is enough, new projects should be using Trusted Publishing.

Comment on lines -37 to -40
# The following are needed if you use legacy PyPI set up
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
# PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
# TWINE_USERNAME: __token__
Copy link
Member

Choose a reason for hiding this comment

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

Same comment

docs/source/how_to_guides/convert_repo_from_repo.md Outdated Show resolved Hide resolved

<details><summary>Using PyPI token (legacy way)</summary>
- [ ] Create a "release" [environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment) on your repository and add an `APP_ID` Environment Variable and `APP_PRIVATE_KEY` secret.
Copy link
Member

Choose a reason for hiding this comment

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

Should we advice to allow that environment only on protected branches?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, updated

blink1073 and others added 2 commits February 27, 2024 22:06
blink1073

This comment was marked as outdated.

@blink1073
Copy link
Contributor Author

I need to merge and iterate so I can release.

@blink1073 blink1073 enabled auto-merge (squash) March 4, 2024 16:11
@blink1073 blink1073 disabled auto-merge March 4, 2024 16:11
@blink1073 blink1073 merged commit a349a20 into jupyter-server:main Mar 4, 2024
19 checks passed
@blink1073 blink1073 deleted the use-github-app branch March 4, 2024 16:12
@fcollonval
Copy link
Member

Thanks a lot @blink1073 for finishing up this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace usage of ADMIN_GITHUB_TOKEN
3 participants