-
Notifications
You must be signed in to change notification settings - Fork 288
Infra: Add community workflows, compliance automation, and dependency review #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sfc-gh-swalia
wants to merge
5
commits into
apache:main
Choose a base branch
from
sfc-gh-swalia:swalia-community-infra
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
440c1ea
Infra: Add community workflows, compliance automation, and dependency…
sfc-gh-swalia 0561546
Removing allowlist check yaml
sfc-gh-swalia 0ad3a37
Addressing review feedback from @kayemkim
sfc-gh-swalia 559748e
Addressing review feedback from JB
sfc-gh-swalia 9ef3f78
- auto-label-prs.yml: replaced js-yaml require with plain text parsing
sfc-gh-swalia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # Shell scripts must use LF line endings to run on Linux CI runners | ||
| dev/check-license eol=lf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # Catch-all: any converter change gets this label (including new converters) | ||
| converter: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/**' | ||
|
|
||
| # Specific converter labels | ||
| converter/dbt: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/dbt/**' | ||
|
|
||
| converter/databricks: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/databricks/**' | ||
|
|
||
| converter/gooddata: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/gooddata/**' | ||
|
|
||
| converter/honeydew: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/honeydew/**' | ||
|
|
||
| converter/omni: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/omni/**' | ||
|
|
||
| converter/orionbelt: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/orionbelt/**' | ||
|
|
||
| converter/polaris: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/polaris/**' | ||
|
|
||
| converter/salesforce: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/salesforce/**' | ||
|
|
||
| converter/snowflake: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/snowflake/**' | ||
|
|
||
| converter/wisdom: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/wisdom/**' | ||
|
|
||
| converter/sigma: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/sigma/**' | ||
|
|
||
| converter/microsoft: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/microsoft/**' | ||
|
|
||
| converter/nvidia: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/nvidia/**' | ||
|
|
||
| converter/ontology: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'converters/ontology/**' | ||
|
|
||
| # Other areas | ||
| cli: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'cli/**' | ||
|
|
||
| spec: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'core-spec/**' | ||
|
|
||
| ontology: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'ontology/**' | ||
|
|
||
| docs: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'docs/**' | ||
|
|
||
| validation: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'validation/**' | ||
|
|
||
| examples: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'examples/**' | ||
|
|
||
| infra: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '.github/**' | ||
| - '.asf.yaml' | ||
| - 'Makefile' | ||
| - '.pre-commit-config.yaml' | ||
| - 'ruff.toml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| name: Auto Label New Issues | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| permissions: | ||
| issues: write | ||
|
|
||
| jobs: | ||
| label: | ||
| if: github.repository_owner == 'apache' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const label = 'needs-triage'; | ||
| try { | ||
| await github.rest.issues.getLabel({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| name: label | ||
| }); | ||
| } catch (e) { | ||
| if (e.status === 404) { | ||
| await github.rest.issues.createLabel({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| name: label, | ||
| color: 'e11d48', | ||
| description: 'Issue needs triage by a maintainer' | ||
| }); | ||
| } else { | ||
| throw e; | ||
| } | ||
| } | ||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| labels: [label] | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| name: Auto Label PRs | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
|
|
||
| jobs: | ||
| label-by-files: | ||
| if: github.repository_owner == 'apache' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const fs = require('fs'); | ||
| const content = fs.readFileSync('.github/labeler.yml', 'utf8'); | ||
| const labels = content.split('\n') | ||
| .filter(line => /^\S.*:/.test(line) && !line.startsWith('#')) | ||
| .map(line => line.split(':')[0].trim()); | ||
| for (const name of labels) { | ||
| try { | ||
| await github.rest.issues.getLabel({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| name | ||
| }); | ||
| } catch (e) { | ||
| if (e.status === 404) { | ||
| await github.rest.issues.createLabel({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| name, | ||
| color: '0e8a16' | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| - uses: actions/labeler@v5 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| sync-labels: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| name: Community PR Helper | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened] | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| welcome: | ||
| if: github.repository_owner == 'apache' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| // Only greet first-time contributors — search for prior PRs by this author | ||
| const author = context.payload.pull_request.user.login; | ||
| const { data: result } = await github.rest.search.issuesAndPullRequests({ | ||
| q: `is:pr repo:${context.repo.owner}/${context.repo.repo} author:${author}` | ||
| }); | ||
|
|
||
| if (result.total_count > 1) { | ||
| console.log('Not a first-time contributor, skipping welcome.'); | ||
| return; | ||
| } | ||
|
|
||
| await github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.payload.pull_request.number, | ||
| body: [ | ||
| 'Thank you for your first contribution to Apache Ossie (incubating)!', | ||
| '', | ||
| 'A committer will review your PR. In the meantime, please ensure:', | ||
| '', | ||
| '- All CI checks pass', | ||
| '- ASF license headers are present on new source files', | ||
| '- Tests cover new functionality', | ||
| '', | ||
| 'No ICLA is required to contribute. If you are elected as a committer in the future, you will need an [Individual Contributor License Agreement (ICLA)](https://www.apache.org/licenses/contributor-agreements.html) on file with the ASF.', | ||
| '', | ||
| '**Questions?** Ask in the PR comments or join us on [Slack](https://join.slack.com/t/apache-ossie/shared_invite/zt-42zw4rflt-Gpve8_NFJq7AsdAQTY~SCg).', | ||
| '', | ||
| 'We appreciate your contribution!' | ||
| ].join('\n') | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| name: Dependency Review | ||
|
|
||
| # Note: For fork-originated PRs, the GITHUB_TOKEN is read-only. | ||
| # The dependency scan still runs but the PR summary comment will be skipped. | ||
| on: [pull_request] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| dependency-review: | ||
| if: github.repository_owner == 'apache' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/dependency-review-action@v4 | ||
| with: | ||
| deny-licenses: GPL-1.0-only, GPL-1.0-or-later, GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only, GPL-3.0-or-later, LGPL-2.0-only, LGPL-2.0-or-later, LGPL-2.1-only, LGPL-2.1-or-later, LGPL-3.0-only, LGPL-3.0-or-later, AGPL-1.0-only, AGPL-1.0-or-later, AGPL-3.0-only, AGPL-3.0-or-later, SSPL-1.0, EUPL-1.1, EUPL-1.2 | ||
| comment-summary-in-pr: always |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.