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

Document PAT creation and hint in alr publish help #1529

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions doc/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@ index on GitHub on your behalf.
Read on for the details underlying these automated steps, or in case you need
to perform further tweaking.

## Creating a Github Personal Access Token

A Personal Access Token (PAT) allows Alire to act on your behalf to fork the
community index, push the new release manifest to a new branch in your own fork,
and finally open a pull-request against the community repository.

The PAT, once created, is a plain string. You can either export the environment
variable `GH_TOKEN` set to this string, or provide it when Alire asks for it.

There are two kinds of PATs on Github: classic and fine-grained. The latter are
in beta and not documented here yet. Follow these steps to create a classic PAT:

1. On the main https://github.com page, after having logged in, click on your
profile photo on the top-right corner.
1. Click on "Settings" in the list of options in the profile menu.
1. Click on "Developer settings" entry at the bottom in your Settings page.
1. Click on "Personal access tokens" and then "Tokens (classic)".
1. Click on "Generate new token" and the select the classic variant.
1. In the "Select scopes" section, under "repo", check "public_repo". This is
the only permission needed for this PAT.
1. Click on "Generate token" at the bottom.

You will get the PAT string after completing the generation.

## General concepts

The community index is a collection of
Expand Down
6 changes: 5 additions & 1 deletion src/alr/alr-commands-publish.ads
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package Alr.Commands.Publish is
function Long_Description (Cmd : Command)
return AAA.Strings.Vector
is (AAA.Strings.Empty_Vector
.Append ("Checks a release and generates an index manifest")
.Append ("Checks a release and generates an index manifest.")
.New_Line
.Append ("See full details at")
.New_Line
Expand All @@ -34,6 +34,10 @@ package Alr.Commands.Publish is
& " issue `alr publish` after committing and pushing"
& " the new release version.")
.New_Line
.Append ("See the above link for instructions on how to create a "
& "Github Personal Access Token (PAT), needed to allow `alr` to "
& "interact with Github (forking, PR creation) on your behalf.")
.New_Line
.Append ("Use --tar to create a source archive ready to be uploaded.")
.New_Line
.Append ("Use --manifest to use metadata in a non-default file.")
Expand Down
Loading