Commit Graph

92 Commits

Author SHA1 Message Date
John Bampton
fdccd425a6 Bump actions/checkout to v4 2023-10-24 14:43:17 +10:00
Yasuo Honda
3116dc85de Update stale issue comment to mention 7-1-stable
https://guides.rubyonrails.org/maintenance_policy.html#bug-fixes
> 3 Bug Fixes
...
> Currently included series: 7.1.Z.
2023-10-09 16:20:04 +09:00
zzak
5c2a112d37
Import rails-bin to internal tools/
Co-authored-by: zzak <zzakscott@gmail.com>
2023-09-13 01:57:16 +00:00
Lorenzo Zabot
b5a5c191f2 Bump github actions/checkout to v4 2023-09-06 15:05:32 +02:00
zzak
9218ef7c65
Use zzak/action-discord@v8
* Removed 'fixed/still failing' modes
* Only runs when failure() step
* Include GITHUB_TOKEN to prevent rate-limits
* Need to reset BUNDLE_ONLY on rubocop job
2023-08-23 10:09:57 +09:00
zzak
b9bdbce61b
Refactor actions to make fewer status checks 2023-08-22 12:13:05 +09:00
Jean Boussier
ca781c84cd Do not codespell yarn.lock 2023-08-17 12:48:20 +02:00
zzak
4bcc7bc951
Fix duplicate Gemfile entry warning
Your Gemfile lists the gem rake (>= 13) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
2023-04-05 11:15:55 +09:00
zzak
f43f4e6372
Notify job should not affect workflow result 2023-04-03 10:54:00 +09:00
Rafael Mendonça França
4d171a4bde
Merge pull request #47779 from zzak/mdl
Introduce markdownlint for guides
2023-03-29 15:33:41 -04:00
Sarah Ridge
48b8285f4d
Update Action Text's Trix dependency (2.0.4) 2023-03-28 12:23:01 -04:00
zzak
c3f2b545f8
Introduce markdownlint for guides
This is a follow up to rails#47186, this time for all markdown content.

[markdownlint](https://github.com/markdownlint/markdownlint) is an excellent tool, and I've found it very useful for finding issues in the guides.

Many of the rules are common style issues I'm correcting on PRs, so it will be nice to have that automated.

We should also be able to use the same config with our editors, so that errors show up in real-time 🙏 and will update the contributing docs once this gets merged with how to debug and use mdl appropriately.
2023-03-27 12:14:18 +09:00
zzak
e4181b33ae
Notify discord when workflows fail on main 2023-03-12 08:06:42 +09:00
Jean Boussier
b31e549cbd Trigger the Dockerfile test on pull_request event as well
x
2023-03-04 16:58:37 +01:00
zzak
874103b73c
CI workflow to build and test --dev image 2023-03-03 19:16:36 +09:00
Hartley McGuire
630b1ff128
Add linter for framework defaults and Rails config
This linter parses the Rails::Application::Configuration file and
ensures that
- all configurations are listed alphabetically in Configuring guide
- all framework defaults are listed alphabetically in Configuring guide
- all framework defaults are included in the new_framework_defaults_x_x
  template
2023-02-12 14:49:02 -05:00
Yasuo Honda
91b02d832d Use Ruby 3.2 for RuboCop workflow
Also bumped rubocop, rubocop-minitest, rubocop-performance and rubocop-rails
because RuboCop workflow uses Gemfile.lock unlike Rails CI that removes it.
2023-01-05 10:43:08 +09:00
Yasuo Honda
cd223db814 Use BUNDLE_ONLY: rubocop suported since Bundler 2.3.19
Bundler 2.3.19 can install gems of the specific group now.

Refer to
https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md#2319-july-27-2022
https://github.com/rubygems/rubygems/pull/5759
https://github.com/rails/rails/pull/38836
2022-12-24 10:07:49 +09:00
Alex Ghiculescu
2d239ad994 Clarify CI requirement in PR template [ci skip]
You can't check if "CI is passing" until you create a PR, because for most people Buildkite will only run the build when a PR is created (It will run on branch push only if you push to a branch of the `rails/rails` repo, which only people with write access can do.). So we shouldn't tell people to wait for CI to pass before submitting a PR.

This PR just tweaks the CI template to explain this in a comment so that people know to check back once CI has actually run.
2022-12-02 11:04:05 -06:00
Sasha Stadnik
29a2a684c5 fix typo in pull request template [ci-skip] 2022-10-25 21:34:03 +03:00
Alex Ghiculescu
cccbc092ae
PR template: note about auto-closing issue
I've noticed a few PRs made since the latest template update, that have said things like "this PR was created because of #ISSUE" or things along those lines. It seems like people are reading the template and following its advice! But Github requires a specific syntax to auto-close an issue, so we may as well encourage people to use that to save everyone a bit of time. So in this PR I've added a comment to the template explaining that.
2022-10-22 09:23:29 -05:00
eileencodes
bb31faba60
Make PR template less onerous
I think no one is reading this because I've seen an increase in draft
PRs. To fix that I've moved the draft statement to the top. I also think
the number of check boxes is a lot and isn't resulting in better PRs
because the length means they are not being read. I removed ones that I
think are repetitive or unhelpful. I wish I could A/B test this...
2022-10-19 10:25:25 -04:00
Rafael Mendonça França
d7c937b7ff
Ignore qunit for spelling check
Only use one tool to check spelling.
2022-09-20 21:13:39 +00:00
Eileen M. Uchitelle
f9030fe0c6
Merge pull request #45495 from okuramasafumi/rewrite-pull-request-template
Update Pull Request Template [ci-skip]
2022-09-08 10:35:38 -04:00
Hartley McGuire
dea0ad3473
Update changelog linter
Two things were changed:
- line number are added to errors so its easier to find them
- blank lines with trailing whitespace now correctly show 1 error
  (trailing whitespace) instead of 2 (trailing whitespace + wrong
  indentation)
2022-08-30 19:30:46 -04:00
John Hawthorn
60c0a3de29 Install specific version of codespell
As the codespell dictionary changes between versions, we should declare
explicitly the version we are ready for so that this CI doesn't break
every time there is a new version.

Ideally this would be upgraded periodically to catch new errors, but I
don't think the need is urgent enough for us to fail CI on PRs.
2022-08-18 12:58:50 -07:00
Hartley McGuire
a4770968ef
Add linter for CHANGELOG formatting
There have been a number of recent commits introducing incorrectly
formatted CHANGELOG entries:
- 9f0b8eb was missing an author
- 936a862 had trailing whitespace
- 238432d had wrong number of leading whitespace
- 51852d2 had wrong number of leading whitespace in the header

To prevent these inconsistencies from happening in the future, I wrote a
small linter for CHANGELOG files that catches all of the above errors.
2022-07-27 19:59:56 -04:00
OKURA Masafumi
69d68a371f Update Pull Request Template
The major change is to add checklist so that it's easier to be read
than comments.
Also, `Summary` is not clear about what should be written, so here
it's changed to `Motivation` and `Detail`.
Finally, it clearly says they can discard this template if they need to.
2022-07-14 22:44:24 +09:00
eileencodes
591c8842cc
Bump ruby version for Rubocop
We should run rubocop using the latest Ruby version.
2022-06-23 08:25:43 -04:00
Varun Sharma
80f7dcfdc2 ci: add GitHub token permissions 2022-05-21 19:23:41 -07:00
Rafael Mendonça França
acf4816994
Stop autoclosing of PRs
While the idea of cleaning up the the PRs list by nudging reviewers
with the stale message and closing PRs that didn't got a review in time
cloud work for the maintainers, in practice it discourages contributors
to submit contributions.

Keeping PRs open and not providing feedback also doesn't help with
contributors motivation, so while I'm disabling this feature of the bot
we still need to come up with a process that will help us to keep
the number of PRs in check, but celebrate the work contributors already
did instead of ignoring it, or dismissing in the form of a "stale"
alerts, and automatically closing PRs.
2022-05-11 16:42:57 +00:00
Jean Boussier
ac8fd700bb
Merge pull request #44985 from jonathanhefner/client9-misspell-immutable-url
Use immutable URL for arbitrary code
2022-05-09 10:01:41 +02:00
Jonathan Hefner
e3e27ebb83 Remove github/codespaces-precache action
This action was deprecated on 2022-04-22.  Its repo has since been
deleted, causing the build to fail:

https://github.com/rails/rails/runs/6162755138?check_suite_focus=true#step:1:31

Note that the current way to configure prebuilds appears to be through
GitHub's web UI:

https://docs.github.com/en/codespaces/prebuilding-your-codespaces/configuring-prebuilds
2022-04-29 15:09:34 -05:00
Jonathan Hefner
4e2df67adc Use immutable URL for arbitrary code
If the `client9/misspell` repo is compromised, an attacker could control
the contents of `install-misspell.sh`.  Since we execute that file
directly, we should use a URL that guarantees its contents will not
change.

Note that, at the time of writing, the last commit to `client9/misspell`
was in March 2018 (client9/misspell@c0b55c8239),
so the code appears to be stable.

Also, although using a tag would be prettier than using a hash, the
repo's last commit is after its most recent tag (`v0.3.4`).
2022-04-29 14:22:01 -05:00
Baoshuo Ren
95253b2582
chore: remove git.io
see: https://github.blog/changelog/2022-04-25-git-io-deprecation/
2022-04-26 21:01:32 +08:00
Kaíque Kandy Koga
3dfe1b8d40 Use actions/checkout@v3 2022-03-30 23:35:04 -03:00
John Bampton
f5117c792f Update codespell Action to Python 3.10 2022-03-29 16:50:43 +10:00
Eugene Kenny
3ccee2c646 Update stale issue comment to mention 7-0-stable
7-0-stable is the release series that currently receives bug fixes.
2022-01-02 00:42:38 +00:00
Erick Sasse
dd6bd200a6 Use built-in bundler-cache from setup-ruby action 2021-12-22 14:23:33 -03:00
Helio Cola
0ad5e11a84
Typo in the Security Policy URL 2021-12-15 23:10:39 -05:00
Xavier Noria
db41e6c1dd
Update .github/pull_request_template.md 2021-09-27 22:08:06 +02:00
Alex Ghiculescu
99977bb7aa
Warning about draft PRs 2021-09-27 15:03:29 -05:00
Rafael Mendonça França
db94a22b08
Fix codespaces precache action 2021-09-22 13:34:27 -04:00
Rafael Mendonça França
0cfee597e4
Setup codespaces prebuild tasks 2021-09-22 13:31:58 -04:00
HParker
0c7a2f93ca [ci skip] Mention executable test cases in issue template
A lot of bug reports have useful reproduction steps that could be a reproduction script, but they seem to have either not found the reproduction script template or didn't read the 'contributing to rails' page at all. This links to the same page at the section that includes the reproduction scripts with a stronger call to action making it clear that they need a reproduction script.
2021-06-01 11:51:31 -07:00
John Bampton
6e85b6b86e Add spell checking with codespell as a GitHub Action
`codespell` works with a small custom dictionary and seems to find perhaps more spelling mistakes than `misspell` which really only fixes commonly misspelled English words.

Not all spell checkers can check all file types and most spell checkers can't find all the errors.

https://github.com/codespell-project/codespell
https://pypi.org/project/codespell/
2021-05-04 14:46:21 +10:00
Rafael França
26150e985a
Merge pull request #41910 from jbampton/add-github-actions
feat(CI): correct commonly misspelled English words with GitHub Actions
2021-04-12 16:30:52 -04:00
John Bampton
6a6a2eb15d docs: fix grammar in security.md [ci-skip] 2021-04-12 12:12:24 +10:00
John Bampton
bf8986783b feat(CI): correct commonly misspelled English words with GitHub Actions
Misspell -> Correct commonly misspelled English words... quickly.  A Golang library that runs without a dictionary.

https://github.com/client9/misspell

Can even autofix with '-w'
2021-04-12 01:01:22 +10:00
Rafael Mendonça França
077c66d5d6
Rename master to main in all code references 2021-01-19 20:46:33 +00:00