-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,50 @@ | ||
name: Add Co-Authors | ||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
add-coauthors: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: 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 "[email protected]" | ||
- 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) | ||
# Extract unique contributors | ||
CONTRIBUTORS=$(git log $MERGE_BASE..$MERGE_COMMIT_SHA --format='%aN <%aE>' | sort -u | grep -v 'GitHub Actions') | ||
# Get the current commit message | ||
COMMIT_MSG=$(git log -1 --pretty=%B) | ||
# Create new commit message with co-authors | ||
NEW_MSG="$COMMIT_MSG"$'\n\n' | ||
while IFS= read -r contributor; do | ||
NEW_MSG+="Co-authored-by: $contributor"$'\n' | ||
done <<< "$CONTRIBUTORS" | ||
# Amend the merge commit with updated message | ||
echo "$NEW_MSG" | git commit --amend -F - | ||
# Force push the changes | ||
git push --force |
This file contains 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 |
---|---|---|
|
@@ -734,6 +734,26 @@ For further assistance, please create an issue on the [GitHub repository](https: | |
|
||
- Note for Contributors: If you would like to submit a Pull Request (PR), please target the `release` branch instead of `main`. The `release` branch is used for testing new code changes and will be periodically merged into `main` after validation. This approach ensures that only tested features make it into the main branch. | ||
|
||
## 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 <[email protected]> | ||
Co-authored-by: Jane Smith <[email protected]> | ||
``` | ||
The workflow is configured in `.github/workflows/add-coauthors.yml`. | ||
## Conclusion | ||
Auto_Jobs_Applier_AIHawk provides a significant advantage in the modern job market by automating and enhancing the job application process. With features like dynamic resume generation and AI-powered personalization, it offers unparalleled flexibility and efficiency. Whether you're a job seeker aiming to maximize your chances of landing a job, a recruiter looking to streamline application submissions, or a career advisor seeking to offer better services, Auto_Jobs_Applier_AIHawk is an invaluable resource. By leveraging cutting-edge automation and artificial intelligence, this tool not only saves time but also significantly increases the effectiveness and quality of job applications in today's competitive landscape. | ||
|