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

Add support for private indexes to "alr publish" #1745

Merged
merged 15 commits into from
Sep 24, 2024

Conversation

Seb-MCaw
Copy link
Contributor

@Seb-MCaw Seb-MCaw commented Aug 28, 2024

Closes #1553

Currently, the publish command always requires the user to provide (or have already configured) the username for a GitHub account, automatically forks the community index, and performs various other checks which are not necessarily applicable to private indexes. It also automatically raises a pull request into the community index, but this can be disabled with the --skip-submit switch.

This PR:

  • alr publish
    • extends the effect of the --skip-submit switch to disable the requirement for a GitHub username to be provided and skip the automatic forking.
    • adds the --for-private-index switch, which disables those checks only applicable to the community index:
      • The "maintainers-logins" field of the manifest need not be a valid GitHub username, or exist at all
      • URLs which appear private are permitted
  • alr init
    • makes the maintainers-logins field optional (configuration of user.github_login was already optional).
    • slightly changes the UI to clarify the function of alr config.
  • General
    • changes validation to allow manifests with no maintainers-logins field, or whose maintainers-logins field has values which are invalid GitHub usernames (but empty strings are still considered invalid)

@Seb-MCaw Seb-MCaw force-pushed the feat/publish-private-indexes branch 3 times, most recently from 96a04a0 to f98a0c4 Compare August 28, 2024 14:50
@Seb-MCaw Seb-MCaw force-pushed the feat/publish-private-indexes branch from f98a0c4 to a67762c Compare August 28, 2024 15:15
@Seb-MCaw Seb-MCaw marked this pull request as ready for review August 29, 2024 11:16
@Seb-MCaw Seb-MCaw mentioned this pull request Sep 3, 2024
Copy link
Member

@mosteo mosteo left a comment

Choose a reason for hiding this comment

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

Just minor things. Thanks for the comprehensive test!

src/alr/alr-commands-init.adb Outdated Show resolved Hide resolved
doc/publishing.md Outdated Show resolved Hide resolved
doc/publishing.md Outdated Show resolved Hide resolved
testsuite/drivers/alr.py Show resolved Hide resolved
testsuite/drivers/helpers.py Show resolved Hide resolved
src/alire/alire-publish.adb Outdated Show resolved Hide resolved
@Seb-MCaw Seb-MCaw requested a review from mosteo September 24, 2024 11:09
@mosteo mosteo merged commit fbaa3da into alire-project:master Sep 24, 2024
27 checks passed
@mosteo
Copy link
Member

mosteo commented Sep 24, 2024

The publishing code is not one of the most straightforward in Alire, and the testing is particularly unfriendly, so congrats on this one.

mosteo pushed a commit to mosteo/alire that referenced this pull request Sep 27, 2024
…ex` (alire-project#1745)

* Add support for private indexes to "alr publish"

* Fix tests

* Support "git@" remotes

* Fix test

* Bugfix

* Update 'config' to 'settings' in 'alr init'

* Update 'config' to 'settings' elsewhere

* Rewrite documentation

* Clarify upload instructions
@Seb-MCaw Seb-MCaw deleted the feat/publish-private-indexes branch November 22, 2024 11:57
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.

Mandatory maintainers-logins field in manifest should not be limited to GitHub logins
3 participants