Skip to content

Commit

Permalink
Merge branch 'ktlint-rule' of https://github.com/manas-yu/oppia-android
Browse files Browse the repository at this point in the history
… into ktlint-rule
  • Loading branch information
manas-yu committed Nov 5, 2024
2 parents d8e8dfe + 71848d9 commit f98f672
Show file tree
Hide file tree
Showing 17 changed files with 461 additions and 91 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/developer_onboarding_notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Celebrating Initial Contributions

on:
pull_request_target:
types: [closed]

permissions:
pull-requests: write

jobs:
comment_on_merged_pull_request:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Environment Variables
env:
AUTHOR: ${{ github.event.pull_request.user.login }}
REPO: ${{ github.event.repository.name }}
OWNER: ${{ github.event.repository.owner.login }}
run: |
echo "AUTHOR=${AUTHOR}" >> $GITHUB_ENV
echo "REPO=${REPO}" >> $GITHUB_ENV
echo "OWNER=${OWNER}" >> $GITHUB_ENV
- name: Count Merged Pull Requests
id: count_merged_pull_requests
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const author = process.env.AUTHOR;
const repo = process.env.REPO;
const owner = process.env.OWNER;
const { data } = await github.rest.search.issuesAndPullRequests({
q: `repo:${owner}/${repo} type:pr state:closed author:${author}`
});
const prCount = data.items.filter(pr => pr.pull_request.merged_at).length;
core.exportVariable('PR_COUNT', prCount);
- name: Comment on the Merged Pull Request
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prCount = parseInt(process.env.PR_COUNT);
const author = process.env.AUTHOR;
const mention = 'adhiamboperes';
const prNumber = context.payload.pull_request.number;
let message;
if (prCount === 1) {
message = `✨ **Fantastic work @${author}!** Your very first PR to Oppia has been merged! 🎉🥳\n\n` +
`You've just taken your first step into open-source, and we couldn’t be happier to have you onboard. 🙌\n` +
`If you're feeling adventurous, why not dive into another issue and keep contributing? The community would love to see more from you! 🚀\n\n` +
`For any support, feel free to reach out to the developer onboarding lead: @${mention}. Happy coding! 👩‍💻👨‍💻`;
} else if (prCount === 2) {
message = `👏 **Well done @${author}!** Two PRs merged already! 🎉🥳\n\n` +
`With your second PR, you're on a roll, and your contributions are already making a difference. 🌟\n` +
`This means you may be eligible to join the Oppia dev team as a collaborator! 🎉 If you're interested, please fill out [this form](https://forms.gle/NxPjimCMqsSTNUgu5) and become an even more integral part of the community. 🌱\n\n` +
`Looking forward to seeing even more contributions from you. The developer onboarding lead: @${mention} is here if you need any help! Keep up the great work! 🚀`;
}
if (prCount === 1 || prCount === 2) {
await github.rest.issues.createComment({
owner: process.env.OWNER,
repo: process.env.REPO,
issue_number: prNumber,
body: message
});
}
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/splash_image.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/component_color_splash_activity_background_color" />
<item android:drawable="@drawable/splash_page" android:gravity="center"/>
</layer-list>
6 changes: 0 additions & 6 deletions app/src/main/res/drawable/splash_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
android:height="640dp"
android:viewportWidth="360"
android:viewportHeight="640">
<group>
<clip-path android:pathData="M0,0h360v640h-360z M 0,0"/>
<path
android:pathData="M0,0h360v640h-360z"
android:fillColor="#019489"/>
</group>
<path
android:pathData="M80,258c0,-6.78 1.62,-12.35 5.16,-17.27A23.25,23.25 0,0 1,100.65 231a30.08,30.08 0,0 1,14.68 0.94,22.51 22.51,0 0,1 12.72,10.43 26.89,26.89 0,0 1,3.37 10,36.05 36.05,0 0,1 0.14,9.68c-1.08,8.47 -4.93,15.28 -12.15,20a23.15,23.15 0,0 1,-11.91 3.88,26.84 26.84,0 0,1 -13,-2.4 23.73,23.73 0,0 1,-9.82 -8.77,28.77 28.77,0 0,1 -4.38,-12.28C80.17,260.72 80.07,259 80,258ZM105,275.24h0a6.62,6.62 0,0 1,0.17 -0.71,22.8 22.8,0 0,1 2.23,-6.07 11.78,11.78 0,0 1,3.24 -3.81c0.23,-0.2 0.23,-0.31 0.13,-0.54a3.9,3.9 0,0 1,2 -5.16,1.24 1.24,0 0,1 0.23,-0.11 4,4 0,0 1,5.17 2.3,4.22 4.22,0 0,1 0.23,2 4,4 0,0 1,-5.9 2.87c-0.34,-0.2 -0.64,-0.47 -1,-0.74 -3.78,3.1 -5,7.46 -5.74,12a1.14,1.14 0,0 0,0.31 0,15.8 15.8,0 0,0 7.35,-1.69 17.6,17.6 0,0 0,5.81 -4.49,20.44 20.44,0 0,0 2.87,-4.55 20.89,20.89 0,0 0,1.68 -8,27.87 27.87,0 0,0 -0.37,-5.06 17.58,17.58 0,0 0,-4.32 -9.11,14.66 14.66,0 0,0 -5.36,-3.81 18.8,18.8 0,0 0,-6.95 -1.42c-0.81,0 -1.66,0 -2.47,0.07a16.25,16.25 0,0 0,-11.87 5.94A17.1,17.1 0,0 0,89.58 250a20.29,20.29 0,0 0,-1.48 8.6,21.78 21.78,0 0,0 2.33,9.48 16.34,16.34 0,0 0,10.62 8.68c0.65,0.16 1.29,0.27 2,0.4a3.52,3.52 0,0 0,0 -0.61,41.92 41.92,0 0,0 -1.35,-8A18.49,18.49 0,0 0,99 262.64a0.5,0.5 0,0 0,-0.67 -0.24,4 4,0 0,1 -5,-2.59 4.61,4.61 0,0 1,-0.17 -1.18,4 4,0 0,1 3.91,-4 3.9,3.9 0,0 1,2.57 0.91,3.83 3.83,0 0,1 1.35,4 4.07,4.07 0,0 1,-1.42 2.23c0.27,0.44 0.57,0.81 0.81,1.25a27.63,27.63 0,0 1,3.21 10.42c0.06,0.58 0.16,1.15 0.23,1.76L104,275.2v-4.52a71.54,71.54 0,0 1,0.47 -8.54,30.53 30.53,0 0,1 1.85,-7.89 0.31,0.31 0,0 0,-0.1 -0.34,4 4,0 1,1 5.54,-1.15 3.92,3.92 0,0 1,-4 1.72c-0.31,0 -0.37,0 -0.47,0.24 -0.24,0.64 -0.51,1.28 -0.71,1.92a32.28,32.28 0,0 0,-1.15 5.94c-0.14,1.55 -0.3,3.1 -0.37,4.66s-0.07,2.9 -0.1,4.35a34.72,34.72 0,0 1,0.13 3.64Z"
android:fillColor="#fff"/>
Expand Down
Loading

0 comments on commit f98f672

Please sign in to comment.