Skip to content

Commit

Permalink
Merge branch 'main' into repo-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Octomerger authored Oct 5, 2021
2 parents 38e1fbe + 39e828d commit 8c5b21e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/staging-undeploy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,21 @@ jobs:
# IMPORTANT: Intentionally OMIT a `concurrency` configuration from this job!
steps:
- name: Add a label to the PR to block deployment during undeployment
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit "$PR_URL" --add-label "automated-block-deploy"
PR_NUMBER: ${{ github.event.pull_request.number }}
with:
script: |
const { owner, repo } = context.repo
await github.issues.addLabels({
owner,
repo,
issue_number: process.env.PR_NUMBER,
labels: [
{ name: 'automated-block-deploy' }
]
})
- name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
Expand Down Expand Up @@ -119,11 +129,19 @@ jobs:
- if: ${{ always() }}
name: Remove the label from the PR to unblock deployment
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit "$PR_URL" --remove-label "automated-block-deploy"
PR_NUMBER: ${{ github.event.pull_request.number }}
with:
script: |
const { owner, repo } = context.repo
await github.issues.removeLabel({
owner,
repo,
issue_number: process.env.PR_NUMBER,
name: 'automated-block-deploy'
})
- name: Send Slack notification if workflow failed
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,19 @@ Lisa, M., & Bot, H. (2017). My Research Software (Version 2.0.4) [Computer softw

{% raw %}
```
@misc{Lisa_My_Research_Software_2017,
@software{Lisa_My_Research_Software_2017,
author = {Lisa, Mona and Bot, Hew},
doi = {10.5281/zenodo.1234},
month = {12},
title = {{My Research Software}},
url = {https://github.com/github/linguist},
version = {2.0.4},
year = {2017}
}
```
{% endraw %}

Note the example above produces a _software_ citation (i.e., `@misc` type in BibTeX rather than `@article`).
Note the example above produces a _software_ citation (i.e., `@software` type in BibTeX rather than `@article`).

For more information, see the [Citation File Format](https://citation-file-format.github.io/) website.

Expand All @@ -66,9 +67,15 @@ When you add a `CITATION.cff` file to the default branch of your repository, it

## Citing something other than software

If you would prefer the GitHub citation information to link to another resource such as a research paper then you can use the `preferred-citation` override in CFF.
If you would prefer the {% data variables.product.prodname_dotcom %} citation information to link to another resource such as a research article, then you can use the `preferred-citation` override in CFF with the following types.

Extended CITATION.cff file describing the software, but linking to a research paper as the preferred citation:
Resource | Type
--------- | -----
Research article | `article`
Conference paper | `conference-paper`
Book | `book`

Extended CITATION.cff file describing the software, but linking to a research article as the preferred citation:

```
cff-version: 1.2.0
Expand Down Expand Up @@ -131,6 +138,10 @@ Lisa, M., & Bot, H. (2021). My awesome research software. Journal Title, 1(1), 1
```
{% endraw %}

## Citing a dataset

If your repository contains a dataset, you can set `type: dataset` in your `CITATION.cff` file to produce a data citation string output in the {% data variables.product.prodname_dotcom %} citation prompt.

## Other citation files

The GitHub citation feature will also detect a small number of additional files that are often used by communities and projects to describe how they would like their work to be cited.
Expand Down

0 comments on commit 8c5b21e

Please sign in to comment.