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

Bump redcarpet from 3.5.0 to 3.5.1 #1

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Twitter bug-bounty program
url: https://hackerone.com/twitter
about: Please report sensitive security issues via Twitter’s bug-bounty program rather than GitHub.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Report
about: Good issue reports are extremely helpful, thank you.
title: One line summary of the issue

---
Describe the details of the issue.

**Steps to reproduce the behavior**

- List all relevant steps to reproduce the observed behavior.

**Expected behavior**

As concisely as possible, describe the expected behavior.

**Actual behavior**

As concisely as possible, describe the observed behavior.

**Environment**

- Operating system name, version, and build number, such as “iOS 14.0.1 (18A393)”.
- Hardware name and revision, such as “iPhone 11 Pro”.
- Xcode version and build number, such as “12.0 (12A7209)”.
- Any other dependencies, such as third-party keyboard and its version, if it’s applicable.
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**Problems**

Explain the context and why you’re making that change. What is the
problem you’re trying to solve?
In some cases there is not a problem and this can be thought of
being the motivation for your change.

**Solution**

Describe the modifications you’ve done.

**Testing**

Describe the way to test your change.
44 changes: 44 additions & 0 deletions .github/workflows/check-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: check-commit

on:
- push
- pull_request

jobs:
check-commit:
runs-on: macOS-latest

steps:
- name: Use Xcode 12
run: |
sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer

- name: Current platform versions
run: |
sw_vers
xcodebuild -version
swift --version
swiftlint version

- name: Checkout default branch
uses: actions/checkout@v2

- name: Cache bundle
uses: actions/cache@v2
env:
cache-name: bundle
with:
path: .bundle
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('Gemfile.lock') }}

- name: Update bundle
run: |
make bundle

- name: Run lint
run: |
make lint

- name: Run test
run: |
make test
59 changes: 59 additions & 0 deletions .github/workflows/update-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: update-github-pages

on:
push:
branches:
- master

jobs:
update-github-pages:
runs-on: macOS-latest

env:
GITHUB_PAGES_PATH: .gh-pages

steps:
- name: Use Xcode 12
run: |
sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer

- name: Show versions
run: |
sw_vers
xcodebuild -version
swift --version

- name: Checkout default branch
uses: actions/checkout@v2

- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
path: ${{ env.GITHUB_PAGES_PATH }}

- name: Cache bundle
uses: actions/cache@v2
env:
cache-name: bundle
with:
path: .bundle
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('Gemfile.lock') }}

- name: Update bundle
run: |
make bundle

- name: Update GitHub Pages
run: |
make ghpages

- name: Commit changes
run: |
cd ${GITHUB_WORKSPACE}/.gh-pages
git config user.name github-actions
git config user.email github-actions@github.com
git add .
if git commit -m "Update."; then
git push
fi
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
/*.xcodeproj
/.build
/.bundle
/.swiftpm
/Packages
/build
xcuserdata/
7 changes: 7 additions & 0 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This configuration file doesn't contain build related arguments
# because these are set with runtime values such as SDK path.
# See also `Makefile`.

author: Twitter, Inc.
readme: Resources/Documentation/README.md
theme: jony
24 changes: 24 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
AllCops:
TargetRubyVersion: 2.6
NewCops: enable
Exclude:
- .git/**/*
- Gemfile
- vendor/**/*

Style/Documentation:
Enabled: false

Metrics:
Enabled: false

Layout/CaseIndentation:
EnforcedStyle: end

Layout/EndAlignment:
EnforcedStyleAlignWith: variable

# Disabled due to Rubocup bug.
# See <https://github.com/rubocop-hq/rubocop/issues/6918>.
Layout/RescueEnsureAlignment:
Enabled: false
15 changes: 15 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
disabled_rules:
- cyclomatic_complexity
- file_length
- function_body_length
- function_parameter_count
- identifier_name
- line_length
- nesting
- opening_brace
- todo
- type_body_length

opt_in_rules:
- anyobject_protocol
- closure_spacing
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## 1.0.0

- Initial release.
5 changes: 5 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Code of conduct

We feel that a welcoming community is important and we ask that you follow Twitter’s
[Open Source Code of Conduct](https://github.com/twitter/code-of-conduct/blob/master/code-of-conduct.md)
in all interactions with the community.
162 changes: 162 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Contributing

We would love to get contributions from you.


## Issues

When creating an issue please try to use the following format.
Good issue reports are extremely helpful, thank you.

```
One line summary of the issue

Details of the issue.

**Steps to reproduce the behavior**

- List all relevant steps to reproduce the observed behavior.

**Expected behavior**

As concisely as possible, describe the expected behavior.

**Actual behavior**

As concisely as possible, describe the observed behavior.

**Environment**

- Operating system name, version, and build number, such as “iOS 14.0.1 (18A393)”.
- Hardware name and revision, such as “iPhone 11 Pro”.
- Xcode version and build number, such as “12.0 (12A7209)”.
- Any other dependencies, such as third-party keyboard and its version, if it’s applicable.
```

## Pull requests

If you would like to test and/or contribute please follow these instructions.

### Workflow

We follow the [GitHub Flow Workflow](https://guides.github.com/introduction/flow/)

1. Fork the repository.
1. Check out the default branch.
1. Create a feature branch.
1. Write code and tests if possible for your change.
1. From your branch, make a pull request against the default branch.
1. Work with repository maintainers to get your change reviewed.
1. Wait for your change to be pulled into the default branch.
1. Delete your feature branch.

### Development

It is useful to use [`Example.xcodeproj`](Examples/) for actual Twitter Text Editor development.

### Testing

Use regular `XCTest` and Swift Package structure.

It is highly recommended to write unit tests for applicable modules, such as the module that provides specific logics.
However often it is not easy for writing unit tests for the part of user interactions on user interface components.

Therefore, unlike many other cases, writing unit test is still highly recommended yet not absolutely required.
Instead, write a detailed comments about problems, solution, and testing in the pull request by following the guidelines below.

Use following command to run all tests.

```
$ make test
```

### Linting

It is using [SwiftLint](https://github.com/realm/SwiftLint) to lint Swift code.
Install it by using such as [Homebrew](https://brew.sh/).

Use following command to execute linting.

```
$ make lint
```

Use following command to auto-correct linting problems.

```
$ make correct
```

### Documentation

It is using [Jazzy](https://github.com/realm/jazzy) to generate documents from the inline documentation comments.

Use following command to install Jazzy locally and update the documents.
The documents generated are placed at `.build/documentation`.

```
$ make doc
```

Use following command to run a local web server for browsing the documents.
It keeps updating the documents when any source files are changed.

You can browse it at <http://localhost:3000/>.

```
$ make doc-server
```

### Submit pull requests

Files should be exempt of trailing spaces, linted and passed all unit tests.

Pull request comments should be formatted to a width no greater than 72 characters.

We adhere to a specific format for commit messages.
Please write your commit messages along these guidelines.

```
One line description of your change (less than 72 characters)

**Problems**

Explain the context and why you’re making that change. What is the
problem you’re trying to solve?
In some cases there is not a problem and this can be thought of
being the motivation for your change.

**Solution**

Describe the modifications you’ve done.

**Testing**

Describe the way to test your change.
```

Some important notes regarding the summary line.

* Describe what was done; not the result.
* Use the active voice.
* Use the present tense.
* Capitalize properly.
* Do not end in a period. This is a title or subject.


### Code review

This repository on GitHub is kept in sync with an internal repository at Twitter.
For the most part this process should be transparent to the repository users, but it does have some implications for how pull requests are merged into the codebase.

When you submit a pull request on GitHub, it will be reviewed by the community (both inside and outside of Twitter), and once the changes are approved, your commits will be brought into Twitter’s internal system for additional testing.
Once the changes are merged internally, they will be pushed back to GitHub with the next sync.

This process means that the pull request will not be merged in the usual way.
Instead a member of the repository owner will post a message in the pull request thread when your changes have made their way back to GitHub, and the pull request will be closed.
The changes in the pull request will be collapsed into a single commit, but the authorship metadata will be preserved.


## License

By contributing your code, you agree to license your contribution under the terms of [the Apache License, Version 2.0](LICENSE).
Loading