Skip to content

Commit

Permalink
Merge latest commits from original repository (v3.8.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Shendryk committed Mar 18, 2024
2 parents ddcfe77 + 4b8714a commit 6b33579
Show file tree
Hide file tree
Showing 250 changed files with 8,954 additions and 15,999 deletions.
14 changes: 6 additions & 8 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,32 @@ We don't use GitHub as a support forum. For any usage questions that are not spe
## Reporting Issues

A great way to contribute to the project is to send a detailed issue when you encounter an problem.
It is very important to check for the same problem or suggestion in the project's issue list first. If you find a match, just add a small comment there.
It is very important to check for the same problem or suggestion in the project's issue list first. If you find a match, just add a small comment there. If the issue is closed and you think it is still occuring in the latest version, please re-open the issue.
Doing this helps prioritize the most common problems and requests.

When reporting issues, please include the following:

- The platform name and version (e.g. iOS 8.1)
- The platform name and version (e.g. iOS 13.4)
- The library version
- The integration method (e.g. CocoaPods/Carthage/manually)
- The integration method (e.g. Swift Package Manager / CocoaPods / Carthage / manually)
- The version of Xcode you're using
- The full output of any stack trace or compiler error
- A small demo project that replicates the issue (especially if the way to reproduce the issue is not straight-forward)
- A small reproduction project that replicates the issue (especially if the way to reproduce the issue is not straight-forward)
- Any other details that would be useful in understanding the problem

This information will help us review and fix your issue faster.


Please do not be offended if we close your issue and reference this document.
If you believe the issue is truely a fault in the project’s codebase, re-open it.

## Pull Requests

We gladly accept any PR's assuming they are well written, documented ( if necessary ) and preferably have test code.
We gladly accept any PR's assuming they are well written, documented (if necessary) and preferably have test code.
If you're unsure if we'll accept a new feature please open an issue requesting it and we can have a discussion before you code and submit a PR.

Checklist:
- Fork the repo and create your branch from the latest master (to minimize the conflicts)
- If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints (pod lib lint)

- Make sure your code lints (`pod lib lint`)
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Bug report
about: Create a report to help us improve CocoaLumberjack
title: ''
labels: Bug
assignees: ''

---

**Checklist**
- [ ] I have read and understood the [CONTRIBUTING guide](https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/.github/CONTRIBUTING.md)
- [ ] I have read the [Documentation](https://github.com/CocoaLumberjack/CocoaLumberjack#documentation)
- [ ] I have searched for a similar issue in the [project](https://github.com/CocoaLumberjack/CocoaLumberjack/issues) and found none

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Create logger '...'
2. Log message '...'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment info**
Info | Value |
-------------------------|-------------------------------------|
Platform Name | e.g. ios / macos / tvos / watchos
Platform Version | e.g. 13.0
CocoaLumberjack Version | e.g. 3.7.4
Integration Method | e.g. spm / carthage / cocoapods / manually
Xcode Version | e.g. Xcode 13.4
Repro rate | e.g. all the time (100%) / sometimes x% / only once
Repro project link | e.g. link to a reproduction project that highlights the issue

**Additional context**
Add any other context about the problem here.
Are you reporting a queue deadlock? If so, please include a complete backtrace of all threads, which you can generate by typing `bt all` in the debugger after you hit the deadlock. We might not be able to fix deadlock reports without a backtrace!
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Feature Request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
19 changes: 10 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
### New Pull Request Checklist

* [ ] I have read and understood the [CONTRIBUTING guide](https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/.github/CONTRIBUTING.md)
* [ ] I have read the [Documentation](http://cocoadocs.org/docsets/CocoaLumberjack/)
* [ ] I have searched for a similar pull request in the [project](https://github.com/CocoaLumberjack/CocoaLumberjack/pulls) and found none
- [ ] I have read and understood the [CONTRIBUTING guide](https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/.github/CONTRIBUTING.md)
- [ ] I have read the [Documentation](http://cocoadocs.org/docsets/CocoaLumberjack/)
- [ ] I have searched for a similar pull request in the [project](https://github.com/CocoaLumberjack/CocoaLumberjack/pulls) and found none

* [ ] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)
* [ ] I have added the required tests to prove the fix/feature I am adding
* [ ] I have updated the documentation (if necessary)
* [ ] I have run the tests and they pass
* [ ] I have run the lint and it passes (`pod lib lint`)
<br/>

- [ ] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I am adding
- [ ] I have updated the documentation (if necessary)
- [ ] I have run the tests and they pass
- [ ] I have run the lint and it passes (`pod lib lint`)

This merge request fixes / refers to the following issues: ...

### Pull Request Description

...

9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

updates:
- package-ecosystem: github-actions
schedule:
interval: weekly
day: tuesday
directory: /
open-pull-requests-limit: 10
21 changes: 0 additions & 21 deletions .github/stale.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/cocoapods-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish CocoaPods Release

on:
release:
types:
- published

env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8

jobs:
publish-podspec:
runs-on: macos-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ^14.3
- uses: actions/checkout@v4
- name: Generate Podspec
env:
EXPECTED_VERSION: ${{ github.event.release.tag_name }}
run: ./Scripts/generate-podspec.sh "${EXPECTED_VERSION}"
- name: Publish Podspec
run: pod trunk push CocoaLumberjack.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/cocoapods-trunk-session-keepalive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CocoaPods Trunk Session Keep-Alive

on:
schedule:
# every Wednesday at 09:23 UTC
- cron: '23 09 * * 3'

jobs:
session-keepalive:
runs-on: macos-14
steps:
- name: Keep CocoaPods Trunk Session Alive
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: pod trunk me --silent
24 changes: 24 additions & 0 deletions .github/workflows/cocoapods-validations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CocoaPods Validation

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8

jobs:
validate-cocoapods:
runs-on: macos-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ^15.2
- uses: actions/checkout@v4
- name: Generate Podspec
run: ./Scripts/generate-podspec.sh
- name: Validate Pod
run: pod lib lint
93 changes: 93 additions & 0 deletions .github/workflows/copyright-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Update copyright years

on:
schedule:
- cron: '42 13 3 1 *' # 3rd of January at 13:42 UTC
workflow_dispatch:
inputs:
year:
type: number
required: true
description: 'The (new) year to update the copyright to'

permissions:
contents: write
pull-requests: write

jobs:
update-copyrights:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine years
id: years
env:
TRIGGER_NAME: ${{ github.event_name }}
YEAR_INPUT: ${{ inputs.year }}
run: |
if [ "${TRIGGER_NAME}" = 'workflow_dispatch' ]; then
NEW_YEAR=${YEAR_INPUT}
else
NEW_YEAR=$(date '+%Y')
fi
echo "new-year=${NEW_YEAR}" >> "${GITHUB_OUTPUT}"
echo "old-year=$(($NEW_YEAR - 1))" >> "${GITHUB_OUTPUT}"
- name: Checkout branch
id: branch
env:
OLD_YEAR: ${{ steps.years.outputs.old-year }}
NEW_YEAR: ${{ steps.years.outputs.new-year }}
run: |
BRANCH_NAME="update-copyright/${OLD_YEAR}-to-${NEW_YEAR}"
echo "branch-name=${BRANCH_NAME}" >> "${GITHUB_OUTPUT}"
git checkout -B "${BRANCH_NAME}"
- name: Update copyrights
run: ./Scripts/update-copyright.sh
env:
OLD_YEAR: ${{ steps.years.outputs.old-year }}
NEW_YEAR: ${{ steps.years.outputs.new-year }}
- name: Commit changes if needed
id: commit
env:
ACTOR: ${{ github.actor }}
OLD_YEAR: ${{ steps.years.outputs.old-year }}
NEW_YEAR: ${{ steps.years.outputs.new-year }}
BRANCH_NAME: ${{ steps.branch.outputs.branch-name }}
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --local user.email "${ACTOR}@noreply.github.com"
git config --local user.name "${ACTOR}"
git add .
git commit -m "Update copyright from ${OLD_YEAR} to ${NEW_YEAR}"
git push --set-upstream origin "${BRANCH_NAME}"
echo 'has-changes=true' >> "${GITHUB_OUTPUT}"
else
echo 'has-changes=false' >> "${GITHUB_OUTPUT}"
fi
- name: Create PR if needed
if: ${{ steps.commit.outputs.has-changes == 'true' }}
env:
OLD_YEAR: ${{ steps.years.outputs.old-year }}
NEW_YEAR: ${{ steps.years.outputs.new-year }}
REPO: ${{ github.repository }}
SOURCE_BRANCH: ${{ steps.branch.outputs.branch-name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TARGET_BRANCH="$(gh repo view "${REPO}" --json 'defaultBranchRef' --jq '.defaultBranchRef.name')"
PR_COUNT="$(gh pr list \
--repo "${REPO}" \
--state 'open' \
--head "${SOURCE_BRANCH}" \
--base "${TARGET_BRANCH}" \
--json 'number' \
--jq 'length')"
if [ "${PR_COUNT}" -eq 0 ]; then
gh pr create \
--repo "${REPO}" \
--head "${SOURCE_BRANCH}" \
--base "${TARGET_BRANCH}" \
--title "Update copyright years from ${OLD_YEAR} to ${NEW_YEAR}" \
--body "This is an automated PR that updates the copyright years from \`${OLD_YEAR}\` to \`${NEW_YEAR}\`."
fi
23 changes: 23 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Danger

on:
pull_request_target:
branches: [ master ]

env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8

jobs:
run-danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: danger/swift
uses: docker://ghcr.io/danger/danger-swift-with-swiftlint:3.15.0
with:
args: --failOnErrors --no-publish-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 6b33579

Please sign in to comment.