Skip to content
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

changes made according to the comments. #984

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1f625dc
Remove unused import statement as it causes tkinter error
Axedyson Nov 26, 2024
5642c9e
Merge pull request #949 from Axedyson/patch-2
surapuramakhil Nov 27, 2024
cea00a8
renamed regex method
surapuramakhil Nov 28, 2024
01f5427
improve the README
Nov 29, 2024
4897630
Merge branch 'hotfix/v2024.11.23' into abhilash/969
surapuramakhil Nov 29, 2024
32dd519
Merge pull request #970 from abhilashshakti/abhilash/969
surapuramakhil Nov 29, 2024
ecf0d93
draft, for early review
surapuramakhil Nov 30, 2024
e65ee59
Merge branch 'hotfix/v2024.11.23' into ft_job_portal_refactoring
surapuramakhil Nov 30, 2024
a99fd7b
updates
surapuramakhil Nov 30, 2024
6e7472f
Merge branch 'ft_job_portal_refactoring' of https://github.com/surapu…
surapuramakhil Nov 30, 2024
903eccf
removed dead code
surapuramakhil Nov 30, 2024
e429736
removed dead code
surapuramakhil Dec 1, 2024
85ebad6
changes done
surapuramakhil Dec 1, 2024
682aa75
updated file names
surapuramakhil Dec 1, 2024
1c4b394
commented test cases failing due to refactoring
surapuramakhil Dec 1, 2024
0deecac
added undetected_chromedriver on req
feder-cr Dec 1, 2024
e67ddd4
Merge pull request #973 from surapuramakhil/ft_job_portal_refactoring
surapuramakhil Dec 1, 2024
854d59a
added version number for driver
surapuramakhil Dec 2, 2024
f0880c9
Merge branch 'hotfix/v2024.11.23' into ft_job_portal_refactoring
surapuramakhil Dec 2, 2024
958ba2c
Merge pull request #983 from surapuramakhil/ft_job_portal_refactoring
surapuramakhil Dec 2, 2024
82243d7
changes made according to the comments.
divyamb08 Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/workflows/add-coauthors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Add Co-Authors
on:
pull_request:
types: [closed]
pull_request_review:
types: [submitted]

jobs:
check-approval:
runs-on: ubuntu-latest
if: github.event.review.state == 'approved'
steps:
- name: Add approval status comment
uses: actions/github-script@v6
with:
script: |
const { owner, repo, number } = context.issue;
await github.rest.issues.createComment({
owner,
repo,
issue_number: number,
body: `✅ PR has been approved! CI process initiated.\nCI Run: ${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`
});

add-coauthors:
needs: check-approval
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "noreply@github.com"

- name: Add co-authors
run: |
# Get the merge commit SHA
MERGE_COMMIT_SHA=$(git rev-parse HEAD)

# Get the base branch (target of PR)
BASE_BRANCH="${{ github.event.pull_request.base.ref }}"

# Find merge base
MERGE_BASE=$(git merge-base HEAD $BASE_BRANCH)

# Get list of commits in PR
COMMITS=$(git log --format="%H" $MERGE_BASE..$MERGE_COMMIT_SHA)

# Initialize co-authors list
CO_AUTHORS=""

# Loop through commits
for commit in $COMMITS; do
# Get commit author email and name
AUTHOR_EMAIL=$(git log -1 --format="%ae" $commit)
AUTHOR_NAME=$(git log -1 --format="%an" $commit)

# Add to co-authors if not already present
AUTHOR_LINE="Co-authored-by: $AUTHOR_NAME <$AUTHOR_EMAIL>"
if [[ ! $CO_AUTHORS =~ $AUTHOR_LINE ]]; then
CO_AUTHORS="$CO_AUTHORS\n$AUTHOR_LINE"
fi
done

# Amend the merge commit with co-authors
if [ ! -z "$CO_AUTHORS" ]; then
git fetch origin $BASE_BRANCH
git checkout $BASE_BRANCH
git pull origin $BASE_BRANCH
echo -e "\n$CO_AUTHORS" | git commit --amend -F -
git push origin $BASE_BRANCH

# Add comment to PR
gh pr comment ${{ github.event.pull_request.number }} --body "✨ Added co-authors to merge commit.\nCI Status: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,17 @@ Before submitting a PR:
- Ask for help when needed

The project maintainers reserve the right to reject any contribution that doesn't meet these guidelines or align with the project's goals.

## Git Co-Authors Feature
This repository includes an automated GitHub Action that preserves contributor attribution when PRs are squashed and merged. The workflow automatically adds `Co-authored-by` lines to the squashed commit message, ensuring that all contributors get proper credit for their work.
### How it works
1. When a PR is merged, the GitHub Action triggers automatically
2. It identifies all unique contributors who made commits in the PR
3. It adds their names and emails as `Co-authored-by` lines to the final squashed commit message
### Example co-authored commit message:
```
feat: Add new feature
Co-authored-by: John Doe <john@example.com>
Co-authored-by: Jane Smith <jane@example.com>
```
The workflow is configured in `.github/workflows/add-coauthors.yml`.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ Using this folder as a guide can be particularly helpful for:
python main.py --resume /path/to/your/resume.pdf
```

- **Using the colled mode:**
- **Using the collect mode:**
If you want to collect job data only to perform any type of data analytics you can use the bot with the `--collect` option. This will store in output/data.json file all data found from linkedin jobs offers.

```bash
Expand Down
7 changes: 7 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
DATE_ALL_TIME = "all_time"
DATE_MONTH = "month"
DATE_WEEK = "week"
DATE_24_HOURS = "24_hours"

LINKEDIN = "linkedin"

# constants used in application
SECRETS_YAML = "secrets.yaml"
WORK_PREFERENCES_YAML = "work_preferences.yaml"
Expand Down
Loading