Skip to content

Commit

Permalink
Squashed 'buildres/csl/csl-styles/' content from commit 737ffa1
Browse files Browse the repository at this point in the history
git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 737ffa1
  • Loading branch information
koppor committed Jan 6, 2021
0 parents commit 5bccc62
Show file tree
Hide file tree
Showing 9,944 changed files with 861,875 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: rmzelle
21 changes: 21 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: false
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- quality-control
- repository
- style-request
# Label to use when marking an issue as stale
staleLabel: waiting
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue hasn't seen any activity in the past 30 days. It will be automatically closed if no further activity occurs in the next two weeks.
# Limit to only `issues` or `pulls`
only: pulls
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 1
119 changes: 119 additions & 0 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Merge to release

on:
push:
branches:
- master
workflow_dispatch:
inputs:
commit_message:
description: Commit message
required: true

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
DISTRIBUTION_UPDATER_TOKEN: "${{ secrets.DISTRIBUTION_UPDATER_TOKEN }}"
steps:
- uses: actions/checkout@v2
if: github.event_name == 'push'
- uses: actions/checkout@v2
if: github.event_name == 'workflow_dispatch'
with:
fetch-depth: 0

- name: Release branch version
id: release
run: echo ::set-output name=branch::v1.0.1
- name: Checkout release branch
uses: actions/checkout@v2
with:
ref: ${{ steps.release.outputs.branch }}
path: './release'

- name: Check for relevant changes
if: github.event_name == 'push'
uses: dorny/paths-filter@v2
id: update
with:
list-files: shell
filters: |
updated:
- added|modified: [ '*.csl', 'dependent/*.csl', '*.xml', 'README.md' ]
deleted:
- deleted: [ '*.csl', 'dependent/*.csl', '*.xml' ]
workflows:
- added|modified: .github/workflows/*.yaml
- name: Changed files
if: github.event_name == 'push'
run: |
echo updated: ${{ steps.update.outputs.updated_files }}
echo deleted: ${{ steps.update.outputs.deleted_files }}
echo workflows: ${{ steps.update.outputs.workflows_files }}
- name: Set up Ruby
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true'))
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
- name: but use cache to speed that up
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true'))
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true'))
run: |
bundle config path vendor/bundle
bundle update sheldon --jobs 4 --retry 3
- name: Populate new branch
run: bundle exec sheldon --token=$GITHUB_TOKEN --verbose --populate release
if: github.event_name == 'workflow_dispatch'

- name: update the timestamps and add the changes
run: bundle exec sheldon --token=$GITHUB_TOKEN --verbose --release release ${{ steps.update.outputs.updated_files }}
if: github.event_name == 'push' && steps.update.outputs.updated == 'true'

- name: delete deleted files
run: cd release && git rm ${{ steps.update.outputs.deleted_files }}
if: github.event_name == 'push' && steps.update.outputs.deleted == 'true'

- uses: stefanzweifel/git-auto-commit-action@v4
with:
repository: 'release'
commit_message: Releasing ${{ steps.update.outputs.updated_files }} ${{ steps.update.outputs.deleted_files }}
if: github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true')

- uses: stefanzweifel/git-auto-commit-action@v4
with:
repository: 'release'
commit_message: ${{ github.event.inputs.commit_message }}
if: github.event_name == 'workflow_dispatch'

# https://styles-update.zotero.org:8826/ is for Zotero (styles page, API's citation server, client style updates, etc.)
# https://styles-update.zotero.org:8827/ is for the Zotero-run instance of https://github.com/citation-style-language/distribution-updater
# that performs the updating of the (to-be-deprecated) https://github.com/citation-style-language/styles-distribution/ repo
- name: ping Zotero servers
if: github.repository == 'citation-style-language/styles'
run: |
curl -H 'Content-Length:' -H "Authorization: $ZOTERO_UPDATE_TOKEN" -F 'payload={"type":"push","branch":"${{ steps.release.outputs.branch }}","status":0,"commit":"'$GITHUB_SHA'"}' https://styles-update.zotero.org:8826/
curl -H 'Content-Length:' -H "Authorization: $ZOTERO_UPDATE_TOKEN" -F 'payload={"type":"push","branch":"${{ steps.release.outputs.branch }}","status":0,"commit":"'$GITHUB_SHA'"}' https://styles-update.zotero.org:8827/
- name: Copy workflows to locales repository
if: github.repository == 'citation-style-language/styles' && steps.update.outputs.workflows == 'true'
uses: drud/action-cross-commit@master
with:
source-folder: .github/workflows
destination-repository: https://csl-bot:${{ secrets.CSLBOT_TOKEN }}@github.com/citation-style-language/locales
destination-folder: .github/workflows
destination-branch: master
git-user: "csl-bot"
git-user-email: [email protected]
git-commit-message: copied ${{ steps.update.outputs.workflows_files }} from styles
64 changes: 64 additions & 0 deletions .github/workflows/sheldon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Pull request feedback

on:
pull_request_target:
types: [ opened, synchronize ]

jobs:
test:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: actions/checkout@v2

- name: Check for relevant changes
uses: dorny/paths-filter@v2
id: changed
with:
list-files: shell
filters: |
style:
- '*.csl'
- 'dependent/*.csl'
locale:
- '*.xml'
- name: Changed files
run: |
echo changed: ${{ steps.changed.outputs.style_files }} ${{ steps.changed.outputs.locale_files }}
- name: Set up Ruby
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
- name: but use cache to speed that up
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
run: |
bundle config path vendor/bundle
bundle update sheldon --jobs 4 --retry 3
- name: Apply the PR
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
run: bundle exec sheldon --token=$GITHUB_TOKEN --apply

- name: Welcome to a new PR
if: github.event.action == 'opened' && steps.changed.outputs.style == 'true'
run: bundle exec sheldon --token=$GITHUB_TOKEN --welcome

- name: See if the styles/locales work
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
run: bundle exec rake

- name: report
if: (failure() || success()) && steps.changed.outputs.style == 'true'
run: bundle exec sheldon --token=$GITHUB_TOKEN --report --verbose
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
spec/sheldon/travis.json
5 changes: 5 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--format Fuubar
--color
--require spec_helper.rb
--format json
--out spec/sheldon/travis.json
82 changes: 82 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Guide to Submitting CSL Styles (and CSL Locales)

The CSL style repository is the central location on the web for collecting and maintaining CSL styles.
Software products like Zotero, Mendeley, and Papers all draw their styles from our repository.

We welcome style submissions (and corrections), and are particularly interested in styles for journals and published style guides.
If you wish to submit a different type of style, please first check our [Criteria for Accepting Styles](https://github.com/citation-style-language/styles/wiki/Criteria-for-Accepting-Styles).

To submit a style, please follow the following steps (for locale files, follow the same steps in the [locales](https://github.com/citation-style-language/locales) repository):

#### 1. Check that your style meets all our [style requirements](https://github.com/citation-style-language/styles/wiki/Style-Requirements)

#### 2. [Validate](https://validator.citationstyles.org/) your style against the CSL schema, and correct any validation errors

#### 3. Create a pull request

The fastest way to get a style accepted into our repository is by creating a **pull request** on the GitHub website.
To start, create a GitHub account and sign in.

##### 3a. Submitting a new style

1. Visit https://github.com/citation-style-language/styles and click the "Create new file" button.
When submitting a [dependent style](https://github.com/citation-style-language/styles/wiki/Requesting-Styles#dependent-styles), first navigate to the [dependent](https://github.com/citation-style-language/styles/tree/master/dependent) subdirectory.
2. Type in the file name of the style in the "Name your file..." text field at the top.
Don't forget to add the ".csl" extension (e.g., "journal-of-results.csl" instead of just "journal-of-results")!
3. Paste the style code into the "<> Edit new file" tab below.
4. Click the "Propose new file" button.
5. In the next window, click the "Create pull request" button.
Describe the changes you've made, and click the "Create pull request" button once more.

(for more help, see GitHub's instructions on [Creating new files](https://help.github.com/articles/creating-new-files))

##### 3b. Submitting changes to an existing style

1. Visit https://github.com/citation-style-language/styles and find the style you wish to change (dependent styles are stored in the [dependent](https://github.com/citation-style-language/styles/tree/master/dependent) subdirectory).
To search the repository by file name, click the "Find file" button or press <kbd>t</kbd> to activate GitHub’s [file finder](https://help.github.com/en/github/searching-for-information-on-github/finding-files-on-github) and start typing.
2. Click on the style name, which will bring you to a page like https://github.com/citation-style-language/styles/blob/master/apa.csl.
3. Click the edit icon (in the shape of a pencil).
This opens a code editor in which you can make your changes (you can for example copy and paste your modified style into this window).
4. Once you have made your changes in the "<> Edit file" tab (and previewed the changes in the "Preview changes" tab), click the "Propose file change" button.
5. In the next window, click the "Create pull request" button.
Describe the changes you've made, and click the "Create pull request" button once more.

(for more help, see GitHub's instructions on [Editing files in another user's repository](https://help.github.com/articles/editing-files-in-another-user-s-repository))

Instead of relying solely on the GitHub website, you can also use a git client, such as [GitHub Desktop](https://desktop.github.com/) for Mac and Windows, or [SmartGit](http://www.syntevo.com/smartgit/).
When using a client, [fork](https://help.github.com/articles/fork-a-repo/) the [style repository](https://github.com/citation-style-language/styles), create a branch off of "master", commit your changes, and then create a [pull request](https://help.github.com/articles/using-pull-requests/).

#### 4. Update your pull request

We often request you to make some changes to your pull request.
Don't create a new pull request right away if your original submission has issues.
It's much easier for us if you update your original pull request instead.

After you create a pull request, our [@csl-bot](https://github.com/csl-bot) will first automatically run a number of tests to check whether your style validates and follows our style requirements.
These tests usually finish within a few minutes.
If there are problems, [@csl-bot](https://github.com/csl-bot) will leave a comment with the identified errors.
If you have trouble understanding these errors, please post a comment in the pull request and ask for help.

We also have a handful of volunteers who review pull requests, usually within a week or two.

To update your pull request:

1. Visit the "Files changed" tab of your pull request.
2. Click the ellipsis button at the top-right of your style, and select "Edit file" in the ellipsis menu.
3. Make your changes, and click the "Commit changes" button.

Any changes made this way will automatically appear in the pull request, and each commit will trigger a new test report.

Once we are satisfied, we will **merge** your pull request.
This can take days or weeks, depending on how busy we are, and on how much back and forth is needed to get your style in acceptable shape.

#### 5. Make additional changes after merging

Once a pull request has been merged, it can no longer be used to submit further changes.
So, if you wish to make additional changes, just create a new pull request.

Please always start from the latest version of the style from our repository, because we may have performed maintenance on your style or accepted corrections from other contributors.

## Asking for help

If you get stuck at a particular step, don't hesitate to ask for help by opening a GitHub issue at https://github.com/citation-style-language/styles/issues (click the "New issue" button).
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ruby '2.7.1'
source 'https://rubygems.org'

gem 'rake'
gem 'rspec'
gem 'nokogiri'
gem 'csl', '~>1.0'
gem 'fuubar'
gem 'sheldon', git: 'https://github.com/citation-style-language/Sheldon.git'
70 changes: 70 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
GIT
remote: https://github.com/citation-style-language/Sheldon.git
revision: 1962fad73610a3e0b1610e0c24c16669d584196b
specs:
sheldon (1.0.2)
citeproc-ruby
csl-styles
diffy
dotenv
nokogiri
ostruct
reverse_markdown

GEM
remote: https://rubygems.org/
specs:
citeproc (1.0.10)
namae (~> 1.0)
citeproc-ruby (1.1.12)
citeproc (~> 1.0, >= 1.0.9)
csl (~> 1.5)
csl (1.5.1)
namae (~> 1.0)
csl-styles (1.0.1.10)
csl (~> 1.0)
diff-lcs (1.4.4)
diffy (3.4.0)
dotenv (2.7.6)
fuubar (2.5.0)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
mini_portile2 (2.4.0)
namae (1.0.1)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
ostruct (0.2.0)
rake (13.0.1)
reverse_markdown (2.0.0)
nokogiri
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.3)
ruby-progressbar (1.10.1)

PLATFORMS
ruby

DEPENDENCIES
csl (~> 1.0)
fuubar
nokogiri
rake
rspec
sheldon!

RUBY VERSION
ruby 2.7.1

BUNDLED WITH
2.1.4
Loading

0 comments on commit 5bccc62

Please sign in to comment.