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

NEW Update issue/PR templates on default branches #28

Conversation

GuySartorelli
Copy link
Member

  • Adds new github-default option for the --branch option
    • Only runs against the default branch, and only runs the scripts in the default-branch dir.
    • This is necessary because we don't control the default branch of some repos, and some of them are master or main, and some of them are for CMS 4 branches
  • Adds new scripts for adding issue/PR templates for docs repos and for non-docs repos

Issue

@@ -196,7 +201,7 @@
// force pushing for cases when doing update-prs
// double make check we're on a branch that we are willing to force push
$currentBranch = cmd('git rev-parse --abbrev-ref HEAD', $MODULE_DIR);
if (!preg_match('#^pulls/[0-9\.]+/module\-standardiser\-[0-9]{10}$#', $currentBranch)) {
if (!preg_match('#^pulls/([0-9\.]+|master|main)/module\-standardiser\-[0-9]{10}$#', $currentBranch)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I could also have changed this to [a-zA-Z0-9\.] but I really doubt we'll ever come across a different-named branch, and if we do it's probably best we take a look and make sure things are doing what we expected them to do.

about: ⚠️ We do not use GitHub issues to track security vulnerability reports. Click "open" on the right to see how to report security vulnerabilities.
- name: Support Question
url: https://www.silverstripe.org/community/
about: We use GitHub issues only to discuss about bugs and new features. For support questions, please use one of the support options available in our community channels.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
about: We use GitHub issues only to discuss about bugs and new features. For support questions, please use one of the support options available in our community channels.
about: We only use GitHub issues to discuss bugs and new features. For support questions, please use one of the support options available in our community channels.

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed in person, I'll keep "only" where it is and remove "about"

Copy link
Member Author

Choose a reason for hiding this comment

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

Done


// The template used for bug report issues
$bugReportTemplate = <<<EOT
name: 🐛 Bug Report
Copy link
Member

Choose a reason for hiding this comment

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

May as well use the cockroach

Copy link
Member Author

Choose a reason for hiding this comment

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

🪳

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

attributes:
label: How to reproduce
description: |
⚠️ This is the most important part of the report ⚠️
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
⚠️ This is the most important part of the report ⚠️
⚠️ This is the most important part of the report ⚠️

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

-->
- #

## PR merge checklist
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
## PR merge checklist
## Pull-request checklist

Copy link
Member Author

Choose a reason for hiding this comment

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

Done but without the hyphen

EOT;

// The template used when clicking "Open a blank issue"
$defaultIssueTemplate = "<!-- Blank templates are for use by maintainers only! If you aren't a maintainer, please pick one of the issue templates. -->";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$defaultIssueTemplate = "<!-- Blank templates are for use by maintainers only! If you aren't a maintainer, please pick one of the issue templates. -->";
$defaultIssueTemplate = "<!-- Blank templates are for use by maintainers only! If you aren't a maintainer, please go back and pick one of the issue templates. -->";

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@GuySartorelli GuySartorelli force-pushed the pulls/main/issue-and-pr-templates branch from ef0405c to 28ebe37 Compare December 20, 2023 23:35
@emteknetnz emteknetnz merged commit 0e8f7c3 into silverstripe:main Dec 21, 2023
1 check passed
@emteknetnz emteknetnz deleted the pulls/main/issue-and-pr-templates branch December 21, 2023 00:16
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.

2 participants