AIHawk-FOSS / Auto_Jobs_Applier_AI_Agent

Auto_Jobs_Applier_AI_Agent aims to easy job hunt process by automating the job application process. Utilizing artificial intelligence, it enables users to apply for multiple jobs in an automated and personalized way.
GNU Affero General Public License v3.0
22.7k stars 3.37k forks source link

[FEATURE]: Git Co-Author - GitHub actions #892

Open surapuramakhil opened 1 week ago

surapuramakhil commented 1 week ago

Feature summary

Problem to fix when commits are sqashed.

Feature description

this is a common problem - when commits are squashed during PR merges - credit for original contributors gets lot.

git co-author is for that

https://www.dormant.ninja/git-co-author-script/

draft co author - github CI

name: Add Co-Authors
on:
  pull_request:
    types: [closed]
jobs:
  add-coauthors:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Add co-authors
        run: |
          # Extract contributors and append as co-authors (refer script)
# Define the base branch (e.g., main or master)
BASE_BRANCH=main

# Find the merge base (divergence point) between the current branch and the base branch
MERGE_BASE=$(git merge-base HEAD $BASE_BRANCH)

# Extract contributors from the commits starting at the merge base up to HEAD
CONTRIBUTORS=$(git log $MERGE_BASE..HEAD --format='%aN <%aE>' | sort | uniq)

# Output or append contributors as Co-authored-by lines
for CONTRIBUTOR in $CONTRIBUTORS; do
  echo "Co-authored-by: $CONTRIBUTOR"
done

Motivation

No response

Alternatives considered

No response

Additional context

No response

divyamb08 commented 1 day ago

@surapuramakhil please find the raised PR https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/pull/979