Skip to content

Commit 2db1feb

Browse files
author
Katarina Blagojevic
authored
repository set up
1 parent ba762b8 commit 2db1feb

File tree

7 files changed

+597
-2
lines changed

7 files changed

+597
-2
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Create PR staging branch
2+
3+
on:
4+
pull_request_target:
5+
branches: [main]
6+
types: [opened, synchronize, reopened, edited]
7+
paths:
8+
- "advisories/**"
9+
workflow_dispatch:
10+
11+
jobs:
12+
ensure-base-is-staging:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: ensure base is staging
17+
env:
18+
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
run: |
22+
set -xeo pipefail
23+
BRANCH_NAME="$PR_AUTHOR"/advisory-improvement-"$PR_NUMBER"
24+
git checkout -b "$BRANCH_NAME"
25+
git push origin "$BRANCH_NAME"
26+
gh pr edit --repo ${{ github.repository }} $PR_NUMBER --base "$BRANCH_NAME"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Delete PR staging branch
2+
3+
on:
4+
pull_request_target:
5+
branches: ["*/advisory-improvement-*"]
6+
types: [closed]
7+
paths:
8+
- "advisories/**"
9+
workflow_dispatch:
10+
11+
jobs:
12+
delete-staging-branch:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: delete staging branch
17+
env:
18+
STAGING_BRANCH: ${{ github.event.pull_request.base.ref }}
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
run: |
21+
set -xeo pipefail
22+
git push origin --delete $STAGING_BRANCH

CODE_OF_CONDUCT.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
+++
2+
version = "1.4"
3+
aliases = ["/version/1/4"]
4+
+++
5+
6+
# Contributor Covenant Code of Conduct
7+
8+
## Our Pledge
9+
10+
In the interest of fostering an open and welcoming environment, we as
11+
contributors and maintainers pledge to make participation in our project and
12+
our community a harassment-free experience for everyone, regardless of age, body
13+
size, disability, ethnicity, sex characteristics, gender identity and expression,
14+
level of experience, education, socio-economic status, nationality, personal
15+
appearance, race, religion, or sexual identity and orientation.
16+
17+
## Our Standards
18+
19+
Examples of behavior that contributes to creating a positive environment
20+
include:
21+
22+
* Using welcoming and inclusive language
23+
* Being respectful of differing viewpoints and experiences
24+
* Gracefully accepting constructive criticism
25+
* Focusing on what is best for the community
26+
* Showing empathy towards other community members
27+
28+
Examples of unacceptable behavior by participants include:
29+
30+
* The use of sexualized language or imagery and unwelcome sexual attention or
31+
advances
32+
* Trolling, insulting/derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or electronic
35+
address, without explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Our Responsibilities
40+
41+
Project maintainers are responsible for clarifying the standards of acceptable
42+
behavior and are expected to take appropriate and fair corrective action in
43+
response to any instances of unacceptable behavior.
44+
45+
Project maintainers have the right and responsibility to remove, edit, or
46+
reject comments, commits, code, wiki edits, issues, and other contributions
47+
that are not aligned to this Code of Conduct, or to ban temporarily or
48+
permanently any contributor for other behaviors that they deem inappropriate,
49+
threatening, offensive, or harmful.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all project spaces, and it also applies when
54+
an individual is representing the project or its community in public spaces.
55+
Examples of representing a project or community include using an official
56+
project e-mail address, posting via an official social media account, or acting
57+
as an appointed representative at an online or offline event. Representation of
58+
a project may be further defined and clarified by project maintainers.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported by contacting the project team at opensource@github.com. All
64+
complaints will be reviewed and investigated and will result in a response that
65+
is deemed necessary and appropriate to the circumstances. The project team is
66+
obligated to maintain confidentiality with regard to the reporter of an incident.
67+
Further details of specific enforcement policies may be posted separately.
68+
69+
Project maintainers who do not follow or enforce the Code of Conduct in good
70+
faith may face temporary or permanent repercussions as determined by other
71+
members of the project's leadership.
72+
73+
## Attribution
74+
75+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
76+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
77+
78+
[homepage]: https://www.contributor-covenant.org
79+
80+
For answers to common questions about this code of conduct, see
81+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Contributing
2+
3+
[fork]: https://github.com/github/advisory-database/fork
4+
[pr]: https://github.com/github/advisory-database/compare
5+
[schema]: https://ossf.github.io/osv-schema/
6+
[code-of-conduct]: CODE_OF_CONDUCT.md
7+
8+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
9+
10+
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md).
11+
12+
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
13+
14+
## Submitting an advisory improvement
15+
16+
0. [Fork][fork] and clone the repository
17+
0. Create a new branch: `git checkout -b my-name-GHSA-ID`
18+
0. Make your change to the advisory file
19+
0. Push to your fork and [submit a pull request][pr]
20+
0. Pat your self on the back and wait for your pull request to be reviewed and merged.
21+
22+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
23+
24+
- Follow the OSSF [OSV schema][schema].
25+
- Change one advisory per PR. If there are multiple advisories you would like to improve, submit them as separate pull requests.
26+
27+
## Resources
28+
29+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
30+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
31+
- [GitHub Help](https://help.github.com)

0 commit comments

Comments
 (0)