You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust submission procedure documentation to get correct PR base repo
The goal is to make it possible for any community member to submit libraries to the registry, regardless of their level
of relevant technical expertise. For this reason, the project documentation includes a detailed and comprehensive set of
instructions for submitting a library.
Since the time these instructions were written, a regression was introduced into the GitHub website:
When creating a commit via the GitHub web interface, the dialog allows the user to select which branch the commit should
be made to. Typically this includes two options:
- "Commit directly to the <target branch> branch"
(where "<target branch>" is the branch the user had selected when they initiated the procedure)
- "Create a new branch for this commit and start a pull request"
If the branch protection rules configured for the target prevent the user from committing to that branch, then the first
of the options is removed (which is the appropriate behavior).
Following GitHub's regression, under the conditions produced by the previous submission procedure, the determination of
whether the first option should be disabled is based on the branch protection configuration of the
arduino/arduino-registry repository, not of the library submitter's fork. This is incorrect because the fork does not
inherit the branch protection settings of the parent, meaning the target branch will never be protected in the fork and
thus that the commit to that branch should be allowed in the dialog.
Because we do have branch protection rules enabled for the `main` branch of the `arduino/library-registry` repo, this
bug causes the default setting in the dialog to be changed from "Commit directly to the main branch" to
"Create a new branch for this commit and start a pull request" when the documented submission procedure is performed.
Strangely, the user flow is significantly different depending on which of these options is selected. The user flow when
"Create a new branch for this commit and start a pull request" is selected forces the user to submit the PR to their own
fork repository instead of to arduino/library-registry. It is essential for the PR to be submitted to
arduino/library-registry so this change in the outcome of the previous documented submission procedure as a side effect
of GitHub's regression is catastrophic.
The submission instructions are hereby updated to once again produce a correct submission. Unfortunately, the procedure
that is now required is more complex and less intuitive than the previous one. In order to mitigate this, I made an
effort to be extra explicit both in describing the actions to be performed, as well as describing the expected result of
each action.
I reported the regression to GitHub. I will change the documentation back to using the more friendly submission
procedure once it is fixed.
1. Click the <kbd>Create fork</kbd> button in the "**Create a new fork**" page.<br />
42
+
A "**Forking arduino/library-registry**" page will open while the fork is in the process of being created.
43
+
1. Wait for the "Forking" process to finish.<br />
44
+
The home page of your [fork](https://docs.github.com/get-started/quickstart/fork-a-repo) of the **library-registry** repository will open.
45
+
1. Click on the file `repositories.txt` under the list of files you see in that page.<br />
46
+
The "**library-registry/repositories.txt**" page will open.
47
+
1. Click the pencil icon ("Edit this file") at the right side of the toolbar in the "**library-registry/repositories.txt**" page.<br />
48
+
The `repositories.txt` file will open in the online text editor.
41
49
1. Add the library repository's URL to the list (it doesn't matter where in the list). This should be the URL of the repository home page. For example:
0 commit comments