Commit graph

115 commits

Author SHA1 Message Date
Jamie Gaskins
f0edbcef90
Add support for versioned releases (#13750)
* Add release scripts

* Use `delete` over `gsub` with an empty string

Co-authored-by: Michael Kohl <citizen428@dev.to>

* wip

* wip

* Include stable release-channel branches in builds

* Add changelog stub

* Include the union of changes to the changelog

* Add things

* Add stuff

* Remove test changelog content

* Fix String#delete call

Extraneous `.` made Ruby parse it as a range

* Fix suggested release command

* Use backticks to denote a command to run

* Add debugging output to script

* Build more appropriate containers for stable

This includes tags

* Check if branch *starts with* release channel name

* Cache tag builds from production tag

* Skip trying to build containers for untagged pushes

* Clear out stubbed changelog

* Update PR template to incorporate CHANGELOG.md

* Run Rubocop on release scripts

This excludes some linter rules that only make sense in code that is
running as part of the Rails app. For example, we can't rely on
`ActiveSupport::TimeWithZone` because these scripts don't load Rails,
and we define top-level methods because they're scripts rather than
complex applications.

Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-07-28 10:10:33 -04:00
Nick Taylor
15afbca471
[15 min fix] Updated husky package and configuration/pre-commit hook (#14346)
Co-authored-by: rhymes <github@rhymes.dev>
2021-07-27 15:39:00 -04:00
Andy Zhao
0eaea33710
Replace admin guide links (#13967)
* Replace admin guide links

* Add missing /docs/

* Add proper links
2021-06-23 15:01:01 -04:00
dependabot[bot]
08720a69c4
Bump peter-evans/create-or-update-comment from 1 to 1.4.5 (#13740)
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 1 to 1.4.5.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](https://github.com/peter-evans/create-or-update-comment/compare/v1...v1.4.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-16 08:57:36 -06:00
Michael Kohl
cbb385bf6d
Update test section (#13972) 2021-06-14 18:58:27 +07:00
Nick Taylor
d5f3894901
Set husky explicilty to version 4.x. (#13514) 2021-04-26 13:26:12 -04:00
rhymes
3f9a91c638
Dependabot: change npm schedule to weekly (#13442) 2021-04-19 13:01:25 +02:00
Josh Puetz
9fe7be190b
Switch references to Forem master branch to main (#12325) 2021-04-16 11:51:06 -05:00
Suzanne Aitchison
65f558e4f2
add some notes re manual testing in pr template and docs (#13414) 2021-04-15 15:03:06 +01:00
Vaidehi Joshi
e94f2f4e31
Update PR template with communicating changes section (#12603)
* Update PR template with communicating changes section

* Combine communicating changes with updating docs section

* Add forem core team only tag to communicating changes

* Specify team over teams
2021-02-10 11:56:56 -08:00
Suzanne Aitchison
00222790fd
Add Storybook as an option for PR documentation (#12573) 2021-02-08 14:21:43 +00:00
Vaidehi Joshi
561c9f74fa
Remove feature request issue template (#12476) 2021-01-29 16:18:46 +01:00
Christina
1f90c63eac
Update issue.yml text. (#12375)
* Update issue.yml text. 

Updating text to give more time for following up on issues and to let the community know why some feature requests may be closed.

* Update .github/workflows/issue.yml

Removing extremely

Co-authored-by: rhymes <rhymes@hey.com>

Co-authored-by: rhymes <rhymes@hey.com>
2021-01-22 10:02:24 -06:00
Molly Struve
7e7bebdb53
Remove OSS team from CODEOWNERS file and add backend team (#12340)
* Refactor:Remove OSS team from CODEOWNERS file and add backend team

* remove one more oss reference
2021-01-20 10:49:12 -06:00
rhymes
c54ee01864
Dependabot: disable language/ecosystem labels attached to PRs (#12260) 2021-01-14 11:21:16 +01:00
rhymes
ca202b0883
Downgrade binding_of_caller to fix Docker compose (#12148)
* Revert "Bump binding_of_caller from 0.8.0 to 1.0.0 (#12059)"

This reverts commit 2e4618a7fa.

* Add explanation

* Tell dependabot to ignore updates
2021-01-06 17:02:27 +01:00
rhymes
92fdf8d720
Upgrade to SimpleCov 0.20 (#12009)
* Upgrade to simplecov 0.20

* Upgrade to latest CodeClimate reporter
2020-12-22 18:46:52 +01:00
rhymes
e79f5fd15b
Tell Dependabot to ignore Simplecov 0.18+ (#11930) 2020-12-16 17:48:41 +01:00
rhymes
d24a40944c
Update Dependabot configuration for Bundler, Yarn/NPM and actions (#11877) 2020-12-14 17:31:16 +01:00
Joe Doss
24eb8b3354
Rework the PULL_REQUEST_ID logic, again (#11871)
and move github.event.issue.number to the workflow file....
2020-12-11 16:03:53 -06:00
Joe Doss
20598be83f
Add GITHUB_TOKEN to workflow. (#11866) 2020-12-11 12:17:05 -06:00
Joe Doss
c87951d4f2
Add create_buildkite_pr_build.sh (#11849)
* Remove rebase workflow as it will not work as expected with third party forks.

* Add the create_buildkite_pr_build.sh script.

This script will use the GitHub API to gather information about the PR, the PR
Author and create a Pull Request pipeline build on Buildkite.

You can mock out the things needed to work on this script locally with the
following environment variables exported:

export BUILDKITE_API_ACCESS_TOKEN=notarealtoken
export GITHUB_EVENT_PATH=$(curl --silent 2d0e0bdefc/github_actions_event_context.json)
export GITHUB_REPOSITORY=forem/forem
export GITHUB_TOKEN=notarealtoken

Note: You will need to get your own BUILDKITE_API_ACCESS_TOKEN and GITHUB_TOKEN
tokens.

You can then run the script locally to create builds from a pull request. The
GITHUB_EVENT_PATH JSON data is from https://github.com/forem/forem/pull/1181
which might not build on Buildkite down the road if is is closed. You might need
to pull down that JSON data and find and replace the PR number 11818 with thing
else.

Also this script could be busted out into it's own GitHub Action repo so you can
work on it outside of the Forem repo, but I don't have the mental fortitude to
work on GitHub Actions at this time. It is the most painful CI systems I have used
to date in terms of having an very very poor feedback loop/developer experience.
It desperately needs a REPL or mock shell for you to develop actions in so you don't
have to keep submitting PRs to your main branch to see results.
2020-12-11 09:41:02 -06:00
rhymes
f8a8e0320b
Fix Dependabot GitHub action syntax (#11864) 2020-12-11 15:10:20 +01:00
Molly Struve
5f5bdb4a32
Refactor:Remove old teams from CODEOWNERS and update general teams (#11850) 2020-12-11 06:49:01 -06:00
Joe Doss
e91dffb1a5
Just use the master branch for now. (#11834) 2020-12-09 13:55:25 -06:00
Joe Doss
eee63068dc
Scope PR comment bot to only run when the PR is opened. (#11830) 2020-12-09 10:44:04 -06:00
Joe Doss
67342a4edf
Add github.event.comment.author_association == 'CONTRIBUTOR' to if statement (#11822)
This should be the last PR to get the `/ci` and `/rebase` commands working in
GitHub Actions. The issue is that our membership settings for `forem/forem` have
everyone set to 'CONTRIBUTOR' instead of 'MEMBER' or 'OWNER'.

Adding github.event.comment.author_association == 'CONTRIBUTOR' should fix this
issue.

I also cleaned up all action files to make the main name of the workflow as
succinct as possible to better organize the left menut of the GitHub Actions
page.

This PR won't fix the issues with the "Run forem/build-containers pipeline"
job in buildkite.yml but I will address those issues in another  PR.
2020-12-09 08:36:57 -06:00
Joe Doss
66dc8081b1
Update buildkite.yml (#11821)
Uncomments if statement as I was able to get the info I needed out of the debug statement. Using admin privs to re-enable the if statement sans tests.
2020-12-08 18:37:16 -06:00
Joe Doss
5edff0182f
Update buildkite.yml (#11820)
Admin merging to disable the conditional for a quick test. TravisCI tests do not need to run for this PR.
2020-12-08 18:31:20 -06:00
Joe Doss
a8b9e9ab95
Add debug to actions. (#11819) 2020-12-08 18:12:06 -06:00
Joe Doss
4504ac15ec
GitHub Action bug fixes (#11816)
* Update if statement w/r/t github.event.issue.pull_request conditional and update
cirrus-actions/rebase to 1.4.

* Fix running the PR comment workflow so it only runs if

github.event.pull_request.head.repo.full_name != github.repository

How neat!
2020-12-08 16:54:28 -06:00
Joe Doss
bb849bf319
Try to fix GitHub Action conditionals again... (#11807) 2020-12-08 10:38:09 -06:00
John Losito
c55dacf598
Check github actions weekly with dependabot (#11779)
* Check github actions weekly with dependabot

* Update dependabot.yml
2020-12-08 11:36:25 -05:00
Joe Doss
71ad902315
Fix YAML so it is actually valid GitHub Action YAMLs. (#11801) 2020-12-08 09:48:49 -06:00
Joe Doss
08447cfea2
Update buildkite.yml (#11799) 2020-12-08 09:02:09 -06:00
Joe Doss
58b7906fe6
GitHub workflow for /ci trigger (#11794)
* GitHub workflow for /ci trigger

Add in GitHub workflow for adding the `ci` label to the PR and running Buildkite
pipeline(s).

The `ci` label will allow the PR to be built on push without havinvg to continuously
issue the `/ci` trigger from a Forem team member.

```
build.pull_request.repository.fork != true || build.pull_request.labels includes "ci"
```

Also using the `/ci` trigger will run the initial pipeline builds too.

* Fix YAML formatting and typos.

* Add note to PR template.

* Conditionally add a comment to a new PR when it originates from a third-party
fork with a note about having to wait for manual approval for our CI to run on
their PR.

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update .github/workflows/pr.yml

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Adjust if statement to include OWNERS and do startsWith instead of contains.

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-12-08 08:32:47 -06:00
Sarthak Sharma
6dee5edd0e
🚀 Ability to allow tag moderators to create chat channels (#9741)
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* Merge conflict resolved

* UI completed for Create Channel

* API for create channel & invitations

* 🚀 Combining Backend and Frontend

* Test cases added

* UI completed for Create Channel

* API for create channel & invitations

* 🚀 Combining Backend and Frontend

* Test cases added

* fix suggestions

* add test cases

* replace mod_relations_admin to tag_moderator

* fix test cases

* refactor and fix code climate issues

* Update app/controllers/chat_channel_memberships_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* fix suggestions

* renaming the methods

* Update app/javascript/chat/chat.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/chat/components/createChatModal.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* add jsDoc and add validation

* add PR suggestions

* renmae the file name to  PascalCase

* add styled component

* refactor channel button component

* fix specs

* fix code smell issues

* fix file name issue

* handle error message

* add jsDoc

* Update app/controllers/chat_channels_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* refactor chat_channel_helpers

* update old hash to new hash

* Update app/javascript/chat/components/ChannelButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/views/chat_channels/index.html.erb

Co-authored-by: Michael Kohl <me@citizen428.net>

* fix syntax error

* Update app/views/chat_channels/index.html.erb

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Policies changed

* The Disable Button issue 🐞

* Fixing Disabled button Issue 🐞

* New group doesn't show up 🐞

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-12-08 13:10:36 +07:00
Lisa Sy
ea00c808bd
Storybook: Add DocsPage and test out static content (#11397)
* Update naming of guidelines section and improve Introduction page

* Add Docs

* Add docs

* Install Docs add-on

- Rename top-level folders and sort manually
- Add MDX static pages

* Updated all Storybook addons to 6.1.3 except for notes as it's currently 5.3.21

* Fixed naming of section for the select component.

* Updated yarn.lock file.

* Added missing dependency @storybook/addon-docs

Co-authored-by: Nick Taylor <nick@dev.to>
2020-12-02 09:56:38 -08:00
Joe Doss
1d4685219d
Multistage container builds (#11468)
* WIP multi-stage container build.

* Move to a multistage build process in the Containerfile.

* Enable testing container

* Finalize the multistage build script and Containerfile. Ooof!

I got blocked for a bit with this bugger:

Step 27/32 : COPY --from=builder --chown=${APP_USER}:${APP_USER} ${APP_HOME} ${APP_HOME}
failed to copy files: failed to copy directory: Error processing tar file(exit status 1): Container ID 100999 cannot be mapped to a host ID

but https://github.com/phusion/passenger-docker/issues/235#issuecomment-636318827

was a good shove in the right direction!

* Fix bugs on container build script.

* Adjust compose files to use multistage builds.

* Add in Buildkite pipeline for building containers.

* Update CODEOWNERS to claim ownership over things that Systems Eng cares about
2020-11-19 10:03:35 -06:00
Marcy Sutton
89e0ea79bb
Update PR template to prompt for accessibility (#11407)
* Add accessibility section to PR template

* Add accessibility section to Forem docs

* Incorporate PR review feedback
2020-11-18 11:52:57 -05:00
Peter Frank
cbde504e91
Add admin guide to "added to docs?" section of PR template (#11366)
I'm linking to the GitBook generated version (https://forem.gitbook.io/forem-admin-guide/) and not the GitHub repo (https://github.com/forem/forem-admin-guide) but I could see the opposite being better.  Open to suggestions.
2020-11-11 11:33:31 -05:00
Michael Kohl
32e461c66b
Update to Ruby 2.7.2 (#10594)
* Update to Ruby 2.7.2

* Update remaining files

* Remove VERBOSE from development.rb and test.rb

* Update Ruby version for dependabot and docs

* Readd accidentally removed code
2020-11-05 16:11:09 +01:00
Vaidehi Joshi
bbc55e2e7b
Update PR template's "has tests?" section (#11088)
* Update PR template to help prompt us all to think a bit deeper about whether testing a code change is actually possible/doable/necessary before checking “no” in the template.

* Standardize around capitalization in PR template checkboxes
2020-10-26 10:12:04 -07:00
rhymes
aa39a1f801
Update CODEOWNERS to remove old teams (#10538) 2020-10-02 12:20:29 -04:00
Mac Siri
df245e7e84
Create codeql-analysis.yml (#10276) 2020-09-11 09:46:45 +02:00
Nick Taylor
ae32687164
Update repository links in PR template (#9760)
* Updated PR template links to https://github.com/forem/forem/...

* Changed DEV to Forem in the wording in the template.
2020-08-12 18:08:56 -04:00
ludwiczakpawel
d5e13f5ba7
Github's bug report template (#9736)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* .
2020-08-11 09:25:52 -04:00
Josh Puetz
7d4a7cc883
[deploy] Change lingering /internal paths to /admin (#9673)
* Change lingering `/internal` paths to `/admin`

* Fix multiline test expectation
2020-08-07 19:52:39 -04:00
Nick Taylor
1faa7c723f
Updated docs.dev.to to docs.forem.com (#9666) 2020-08-07 11:24:53 -04:00
Alberto Pérez de Rada Fiol
8b882dd512
Add workflow automating maintainers' comment on new issues (#9488)
* Add workflow automating maintainers' comment on new issues

* Add steps

* Convert steps to a list
2020-07-29 14:17:47 +02:00