Skip to content

Commit 83d8129

Browse files
AI for FS, First Commit App Demo
AI for FS, First Commit App Demo
1 parent d05290b commit 83d8129

File tree

623 files changed

+541237
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

623 files changed

+541237
-318
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Banned file changes (PR)
2+
on:
3+
# pull_request:
4+
# branches: [ "**/*" ]
5+
pull_request_target:
6+
7+
jobs:
8+
check_for_banned_file_changes:
9+
name: Look for unsupported (banned) file modifications on PRs
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 'Get number of git commits'
13+
uses: oracle-devrel/[email protected]
14+
id: num_commits
15+
with:
16+
pull_url: ${{ github.event.pull_request.url }}
17+
- name: 'Checkout repo'
18+
uses: actions/checkout@v2
19+
with:
20+
ref: ${{ github.event.pull_request.head.ref }}
21+
repository: ${{ github.event.pull_request.head.repo.full_name }}
22+
fetch-depth: ${{ steps.num_commits.outputs.fetch_depth }}
23+
- name: Get file changes
24+
uses: oracle-devrel/[email protected]
25+
id: files
26+
with:
27+
pull_url: ${{ github.event.pull_request.url }}
28+
- name: Look for changes to .github
29+
if: contains(steps.files.outputs.all_files_changed, '.github')
30+
run: |
31+
echo 'Changes to files in .github are not allowed.'
32+
- name: Comment if .github changed
33+
if: contains(steps.files.outputs.all_files_changed, '.github')
34+
uses: mshick/add-pr-comment@v1
35+
with:
36+
message: |
37+
:no_entry: **Banned Files Modified**
38+
Changes to files in `.github` are not permitted. Please revert your changes and re-submit a new PR. Simply changing the file back to its original state and re-committing won't work (you must revert the changes made to it).
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}
40+
- name: Look for changes to license_policy.yml
41+
if: contains(steps.files.outputs.all_files_changed, '"license_policy.yml"')
42+
run: |
43+
echo 'Changes to license_policy.yml are not allowed.'
44+
- name: Comment if license_policy.yml changed
45+
if: contains(steps.files.outputs.all_files_changed, '"license_policy.yml"')
46+
uses: mshick/add-pr-comment@v1
47+
with:
48+
message: |
49+
:no_entry: **Banned Files Modified**
50+
Changes to `license_policy.yml` are not permitted. Please revert your changes and re-submit a new PR. Simply changing the file back to its original state and re-committing won't work (you must revert the changes made to it).
51+
repo-token: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Look for changes to repolinter.json
53+
if: contains(steps.files.outputs.all_files_changed, '"repolinter.json"')
54+
uses: mshick/add-pr-comment@v1
55+
with:
56+
message: |
57+
:no_entry: **Banned Files Modified**
58+
Changes to `repolinter.json` are not permitted. Please revert your changes and re-submit a new PR. Simply changing the file back to its original state and re-committing won't work (you must revert the changes made to it).
59+
repo-token: ${{ secrets.GITHUB_TOKEN }}
60+
- name: Comment if repolinter.json changed
61+
if: contains(steps.files.outputs.all_files_changed, '"repolinter.json"')
62+
run: |
63+
echo 'Changes to repolinter.json are not allowed.'
64+
- name: Look for changes to sonar-project.properties
65+
if: contains(steps.files.outputs.all_files_changed, '"sonar-project.properties"')
66+
uses: mshick/add-pr-comment@v1
67+
with:
68+
message: |
69+
:no_entry: **Banned Files Modified**
70+
Changes to `sonar-project.properties` are not permitted. Please revert your changes and re-submit a new PR. Simply changing the file back to its original state and re-committing won't work (you must revert the changes made to it).
71+
repo-token: ${{ secrets.GITHUB_TOKEN }}
72+
- name: Comment if sonar-project.properties changed
73+
if: contains(steps.files.outputs.all_files_changed, '"sonar-project.properties"')
74+
run: |
75+
echo 'Changes to sonar-project.properties are not allowed.'
76+
- name: Fail on banned file changes
77+
if: contains(steps.files.outputs.all_files_changed, '.github') || contains(steps.files.outputs.all_files_changed, '"license_policy.yml"') || contains(steps.files.outputs.all_files_changed, '"repolinter.json"') || contains(steps.files.outputs.all_files_changed, '"sonar-project.properties"')
78+
run: |
79+
exit 1
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened,closed,synchronize]
7+
8+
jobs:
9+
CLAssistant:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: "CLA Assistant"
13+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
14+
# Beta Release
15+
uses: cla-assistant/[email protected]
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
# the below token should have repo scope and must be manually added by you in the repository's secret
19+
PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
20+
with:
21+
# for per-repo CLA-acceptance:
22+
# path-to-signatures: 'signatures/oca-20210504/${{ github.repository }}'
23+
# for per-GHO CLA-acceptance:
24+
path-to-signatures: 'signatures/oca-20210504/oracledevrel'
25+
path-to-document: 'https://github.com/oracledevrel/devrel-oca-mgmt/blob/main/oca-20210504.md' # e.g. a CLA or a DCO document
26+
# branch should not be protected
27+
branch: 'main'
28+
allowlist: bot*
29+
30+
#below are the optional inputs - If the optional inputs are not given, then default values will be taken
31+
remote-organization-name: "oracledevrel" # enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
32+
remote-repository-name: "devrel-oca-mgmt" # enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
33+
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
34+
#signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
35+
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
36+
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
37+
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
38+
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
39+
#use-dco-flag: true - If you are using DCO instead of CLA
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Audit licenses
2+
on:
3+
pull_request_target:
4+
5+
jobs:
6+
run_scancode_toolkit:
7+
name: Get inventory of licenses used in project
8+
runs-on: ubuntu-latest
9+
container:
10+
image: ghcr.io/oracledevrel/scancode-toolkit:v21.3.31
11+
credentials:
12+
username: ${{ github.actor }}
13+
password: ${{ secrets.GHCR_PAT }}
14+
steps:
15+
- name: 'Checkout repo'
16+
uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.event.pull_request.head.ref }}
19+
repository: ${{ github.event.pull_request.head.repo.full_name }}
20+
- name: Run Scancode-toolkit
21+
run: |
22+
scancode -l --ignore licenses.json --ignore .github/**/* --ignore license_policy.yml --license-policy license_policy.yml --only-findings --summary --json-pp licenses.json *
23+
echo "\n\nHere is the licenses.json:\n"
24+
echo $(cat licenses.json)
25+
- name: Look for non-approved licenses
26+
uses: oracle-devrel/[email protected]
27+
id: analysis
28+
with:
29+
licenses_file: '/github/workspace/licenses.json'
30+
- name: Analysis results
31+
run: echo "${{ steps.analysis.outputs.unapproved_licenses }}"
32+
- name: Comment if analysis finds unapproved licenses
33+
if: steps.analysis.outputs.unapproved_licenses == 'true'
34+
uses: mshick/add-pr-comment@v1
35+
with:
36+
message: |
37+
:no_entry: **License Inspection**
38+
Requires manual inspection. There are some licenses which dictate further analysis and review.
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}
40+
- name: Halt pipeline on unapproved licenses
41+
if: steps.analysis.outputs.unapproved_licenses == 'true'
42+
run: exit 1
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release ZIP file packaging
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
create_zip:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Checkout repo'
12+
uses: actions/checkout@v2
13+
- name: 'Make (and upload) ZIP file(s)'
14+
uses: oracle-devrel/[email protected]
15+
id: zip_maker
16+
with:
17+
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Repolinter
2+
on:
3+
pull_request_target:
4+
jobs:
5+
run_repolinter:
6+
name: Run Repolinter on pull request
7+
runs-on: ubuntu-latest
8+
container:
9+
image: ghcr.io/oracledevrel/repolinter:v0.11.1
10+
credentials:
11+
username: ${{ github.actor }}
12+
password: ${{ secrets.GHCR_PAT }}
13+
steps:
14+
- name: 'Checkout repo'
15+
uses: actions/checkout@v2
16+
with:
17+
ref: ${{ github.event.pull_request.head.ref }}
18+
repository: ${{ github.event.pull_request.head.repo.full_name }}
19+
- name: Run Repolinter
20+
run: |
21+
set +e
22+
bundle exec /app/bin/repolinter.js lint --format json --rulesetFile repolinter.json . > repolinter_results.json
23+
echo "\n\nHere is the repolinter_results.json:\n"
24+
echo $(cat repolinter_results.json)
25+
exit 0
26+
- name: Analyze the Repolinter results
27+
uses: oracle-devrel/[email protected]
28+
id: analysis
29+
with:
30+
json_results_file: '/github/workspace/repolinter_results.json'
31+
- name: Overall analysis results
32+
run: |
33+
echo "Passed: ${{ steps.analysis.outputs.passed }}"
34+
echo "Errored: ${{ steps.analysis.outputs.errored }}"
35+
- name: Comment if analysis finds missing disclaimer
36+
if: steps.analysis.outputs.disclaimer_found == 'false'
37+
uses: mshick/add-pr-comment@v1
38+
with:
39+
message: |
40+
:no_entry: **FAILURE: Missing Disclaimer**
41+
The standard Oracle Disclaimer seems to be missing from the readme. Please add it:
42+
43+
ORACLE AND ITS AFFILIATES DO NOT PROVIDE ANY WARRANTY WHATSOEVER, EXPRESS OR IMPLIED, FOR ANY SOFTWARE, MATERIAL OR CONTENT OF ANY KIND CONTAINED OR PRODUCED WITHIN THIS REPOSITORY, AND IN PARTICULAR SPECIFICALLY DISCLAIM ANY AND ALL IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. FURTHERMORE, ORACLE AND ITS AFFILIATES DO NOT REPRESENT THAT ANY CUSTOMARY SECURITY REVIEW HAS BEEN PERFORMED WITH RESPECT TO ANY SOFTWARE, MATERIAL OR CONTENT CONTAINED OR PRODUCED WITHIN THIS REPOSITORY. IN ADDITION, AND WITHOUT LIMITING THE FOREGOING, THIRD PARTIES MAY HAVE POSTED SOFTWARE, MATERIAL OR CONTENT TO THIS REPOSITORY WITHOUT ANY REVIEW. USE AT YOUR OWN RISK.
44+
45+
Details:
46+
${{ steps.analysis.outputs.disclaimer_details }}
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}
48+
- name: Comment if analysis finds missing readme
49+
if: steps.analysis.outputs.readme_file_found == 'false'
50+
uses: mshick/add-pr-comment@v1
51+
with:
52+
message: |
53+
:no_entry: **FAILURE: Missing README**
54+
The README file seems to be missing. Please add it.
55+
56+
Details:
57+
${{ steps.analysis.outputs.readme_file_details }}
58+
repo-token: ${{ secrets.GITHUB_TOKEN }}
59+
- name: Comment if analysis finds missing license
60+
if: steps.analysis.outputs.license_file_found == 'false'
61+
uses: mshick/add-pr-comment@v1
62+
with:
63+
message: |
64+
:no_entry: **FAILURE: Missing LICENSE**
65+
The LICENSE file seems to be missing. Please add it.
66+
67+
Details:
68+
${{ steps.analysis.outputs.license_file_details }}
69+
repo-token: ${{ secrets.GITHUB_TOKEN }}
70+
- name: Comment if analysis finds copyright notice missing
71+
if: steps.analysis.outputs.copyright_found == 'false'
72+
uses: mshick/add-pr-comment@v1
73+
with:
74+
message: |
75+
:warning: **WARNING: Missing Copyright Notice(s)**
76+
It's a good idea to have copyright notices at the top of each file. It looks like at least one file was missing this (though it might be further down in the file - this might be a false-positive).
77+
78+
Details:
79+
${{ steps.analysis.outputs.copyright_details }}
80+
repo-token: ${{ secrets.GITHUB_TOKEN }}
81+
- name: Halt pipeline if README is missing
82+
if: steps.analysis.outputs.readme_file_found == 'false'
83+
run: exit 1
84+
- name: Halt pipeline if LICENSE is missing
85+
if: steps.analysis.outputs.license_file_found == 'false'
86+
run: exit 1
87+
- name: Halt pipeline if disclaimer is missing
88+
if: steps.analysis.outputs.disclaimer_found == 'false'
89+
run: exit 1

ai-for-financialservices/.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# General
2+
.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
6+
# Icon must end with two \r
7+
Icon
8+
9+
10+
# Thumbnails
11+
._*
12+
13+
# Files that might appear in the root of a volume
14+
.DocumentRevisions-V100
15+
.fseventsd
16+
.Spotlight-V100
17+
.TemporaryItems
18+
.Trashes
19+
.VolumeIcon.icns
20+
.com.apple.timemachine.donotpresent
21+
22+
# Directories potentially created on remote AFP share
23+
.AppleDB
24+
.AppleDesktop
25+
Network Trash Folder
26+
Temporary Items
27+
.apdisk
28+
29+
# ignore common security keys
30+
.key
31+
.crt
32+
.csr
33+
.pem
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing to this repository
2+
3+
We welcome your contributions! There are multiple ways to contribute.
4+
5+
## Opening issues
6+
7+
For bugs or enhancement requests, please file a GitHub issue unless it's
8+
security related. When filing a bug remember that the better written the bug is,
9+
the more likely it is to be fixed. If you think you've found a security
10+
vulnerability, do not raise a GitHub issue and follow the instructions in our
11+
[security policy](./SECURITY.md).
12+
13+
## Contributing code
14+
15+
We welcome your code contributions. Before submitting code via a pull request,
16+
you will need to have signed the [Oracle Contributor Agreement][OCA] (OCA) and
17+
your commits need to include the following line using the name and e-mail
18+
address you used to sign the OCA:
19+
20+
```text
21+
Signed-off-by: Your Name <[email protected]>
22+
```
23+
24+
This can be automatically added to pull requests by committing with `--sign-off`
25+
or `-s`, e.g.
26+
27+
```text
28+
git commit --signoff
29+
```
30+
31+
Only pull requests from committers that can be verified as having signed the OCA
32+
can be accepted.
33+
34+
## Pull request process
35+
36+
1. Ensure there is an issue created to track and discuss the fix or enhancement
37+
you intend to submit.
38+
1. Fork this repository.
39+
1. Create a branch in your fork to implement the changes. We recommend using
40+
the issue number as part of your branch name, e.g. `1234-fixes`.
41+
1. Ensure that any documentation is updated with the changes that are required
42+
by your change.
43+
1. Ensure that any samples are updated if the base image has been changed.
44+
1. Submit the pull request. *Do not leave the pull request blank*. Explain exactly
45+
what your changes are meant to do and provide simple steps on how to validate.
46+
your changes. Ensure that you reference the issue you created as well.
47+
1. We will assign the pull request to 2-3 people for review before it is merged.
48+
49+
## Code of conduct
50+
51+
Follow the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule). If you'd
52+
like more specific guidelines, see the [Contributor Covenant Code of Conduct][COC].
53+
54+
[OCA]: https://oca.opensource.oracle.com
55+
[COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/

0 commit comments

Comments
 (0)