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

Environments > Deployment branches and tags > Selected branches and tags. pattern description not matching link to doc #29473

Closed
1 task done
Tracked by #29477
Julio-Villanueva opened this issue Oct 27, 2023 · 3 comments
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review

Comments

@Julio-Villanueva
Copy link

Julio-Villanueva commented Oct 27, 2023

Code of Conduct

What article on docs.github.com is affected?

Details:

Article url https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#environment-protection-rules
Article repo url https://github.com/github/docs/blob/main/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md
Article path in repo docs/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md
Section Deployment branches and tags
version parent: 541d625 commit: f23c0f3

Extract of current content web:

Selected branches and tags: Only branches and tags that match your specified name patterns can deploy to the environment.

If you specify releases/* as a deployment branch or tag rule, only a branch or tag whose name begins with releases/ can deploy to the environment. (Wildcard characters will not match /. To match branches or tags that begin with release/ and contain an additional single slash, use release//.) If you add main as a branch rule, a branch named main can also deploy to the environment. For more information about syntax options for deployment branches, see the Ruby File.fnmatch documentation.

Extract of current content repo file:

Selected branches{% ifversion deployment-protections-tag-patterns %} and tags{% endif %}: Only branches{% ifversion deployment-protections-tag-patterns %} and tags{% endif %} that match your specified name patterns can deploy to the environment.

If you specify releases/* as a deployment branch{% ifversion deployment-protections-tag-patterns %} or tag{% endif %} rule, only a branch{% ifversion deployment-protections-tag-patterns %} or tag{% endif %} whose name begins with releases/ can deploy to the environment. (Wildcard characters will not match /. To match branches{% ifversion deployment-protections-tag-patterns %} or tags{% endif %} that begin with release/ and contain an additional single slash, use release//.) If you add main as a branch rule, a branch named main can also deploy to the environment. For more information about syntax options for deployment branches, see the Ruby File.fnmatch documentation.

extract of current content code:


- **Selected branches{% ifversion deployment-protections-tag-patterns %} and tags{% endif %}**: Only branches{% ifversion deployment-protections-tag-patterns %} and tags{% endif %} that match your specified name patterns can deploy to the environment.

  If you specify `releases/*` as a deployment branch{% ifversion deployment-protections-tag-patterns %} or tag{% endif %} rule, only a branch{% ifversion deployment-protections-tag-patterns %} or tag{% endif %} whose name begins with `releases/` can deploy to the environment. (Wildcard characters will not match `/`. To match branches{% ifversion deployment-protections-tag-patterns %} or tags{% endif %} that begin with `release/` and contain an additional single slash, use `release/*/*`.) If you add `main` as a branch rule, a branch named `main` can also deploy to the environment. For more information about syntax options for deployment branches, see the [Ruby `File.fnmatch` documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch).

  {% ifversion deployment-protections-tag-patterns %}

  {% data reusables.actions.branch-and-tag-deployment-rules-configuration %}

  {% endif %}

{% ifversion fpt %}{% note %}


What changes are you suggesting?

I have seems to find an issue, It is low priority but I wanted to warn about it since it makes GitHub docs look messy and it makes environment less user-friendly. Please let me know if I am mistaken:

Syntax options from the provided link:

"For more information about syntax options for deployment branches, see the Ruby File.fnmatch documentation."

Do not match those provided in the description:

"if you specify releases/* as a deployment branch or tag rule, only a branch or tag whose name begins with releases/ can deploy to the environment. (Wildcard characters will not match /. To match branches or tags that begin with release/ and contain an additional single slash, use release//.) If you add main as a branch rule, a branch named main can also deploy to the environment"

Additionally

And it does not match other branch patterns in GitHub like the workflow triggers for branch, an standardization on branch patterns would be appreciated since is not only the documentation misleading but also it is not like I can take reference from other areas where I have work with branches in GitHub.

Additional information

I did not found a similar issue

@Julio-Villanueva Julio-Villanueva added the content This issue or pull request belongs to the Docs Content team label Oct 27, 2023
@welcome
Copy link

welcome bot commented Oct 27, 2023

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 27, 2023
@cmwilson21
Copy link
Contributor

@Julio-Villanueva Thanks so much for opening an issue! I'll triage this for the team to take a look 👀

@cmwilson21 cmwilson21 added actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Oct 27, 2023
@SiaraMist
Copy link
Contributor

Hey @Julio-Villanueva, thank you so much for opening a docs issue!

After reading through your description, it seems like this would be better served as product feedback than a docs update. Because deployment branches and tags do use the Ruby File fnmatch for their syntax options, we wouldn't want to update the documentation to point to pattern rules that don't match how this part of GitHub actually works. To give feedback on GitHub, you can create a post in the Community Discussion, and we really appreciate hearing about things like this! In light of this, I'm going to close this issue.

Thank you again for contributing to GitHub! 💛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

No branches or pull requests

4 participants
@cmwilson21 @SiaraMist @Julio-Villanueva and others