bevy/.github/workflows/welcome.yml
TrialDragon 9054d9dacb
Deprecate old contributing documentation / information (#14885)
# Objective
Fixes #14884

We have launched the new [contributing
guide](https://bevyengine.org/learn/contribute/introduction) on Bevy's
website, so these sources of information should be removed to avoid
syncing across duplicate files and maintaining a single source of truth
on contributing.
## Solution

### Remove the files:
- `docs/release_checklist.md`.
- `docs/the_bevy_organization.md`.
- `.github/contributing/engine_style_guide.md`.
- `.github/contributing/example_style_guide.md`.

#### These are replaced by:
-
`https://bevyengine.org/learn/contribute/project-information/release-process/`.
-
`https://bevyengine.org/learn/contribute/project-information/bevy-organization/`.
-
`https://bevyengine.org/learn/contribute/helping-out/opening-pull-requests/#style-guide`.
-
`https://bevyengine.org/learn/contribute/helping-out/creating-examples/#style-guide`

### Make `CONTRIBUTING.md` re-direct to Bevy's website's Contributing
Guide `https://bevyengine.org/learn/contribute/introduction`

### Change the contributing guide link in `welcome.yml` workflow to link
to Bevy's website's Contributing Guide
`https://bevyengine.org/learn/contribute/introduction`


## Testing

I looked at the markdown files in my repository's branch to make sure
they look fine. I have not tested the `welcome.yml` workflow since I
don't know how, without having a new contributor make a PR to my branch.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-08-23 11:47:02 +00:00

45 lines
1.4 KiB
YAML

name: Welcome new contributors
# This workflow has write permissions on the repo
# It must not checkout a PR and run untrusted code
on:
pull_request_target:
types:
- opened
jobs:
welcome:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
// Get a list of all issues created by the PR opener
// See: https://octokit.github.io/rest.js/#pagination
const creator = context.payload.sender.login
const opts = github.rest.issues.listForRepo.endpoint.merge({
...context.issue,
creator,
state: 'all'
})
const issues = await github.paginate(opts)
for (const issue of issues) {
if (issue.number === context.issue.number) {
continue
}
if (issue.pull_request) {
return // Creator is already a contributor.
}
}
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `**Welcome**, new contributor!
Please make sure you've read our [contributing guide](https://bevyengine.org/learn/contribute/introduction) and we look forward to reviewing your pull request shortly ✨`
})