77jobs :
88 record_pr_timestamp :
99 runs-on : ubuntu-latest
10- if : github.event_name == 'pull_request'
11- outputs :
12- pr_timestamp : ${{ steps.get_pr_timestamp.outputs.pr_timestamp }}
10+ if : github.event_name == 'pull_request'
11+ outputs :
12+ pr_timestamp : ${{ steps.get_pr_timestamp.outputs.pr_timestamp }}
1313 steps :
1414 - name : Get Current Timestamp for PR
1515 id : get_pr_timestamp
16- run : |
16+ run : |
1717 current_timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
1818 seconds_since_epoch=$(date -d "${current_timestamp}" +%s)
1919 echo "PR timestamp: ${current_timestamp}"
2323 get_issue_timestamp :
2424 needs : record_pr_timestamp
2525 runs-on : ubuntu-latest
26- outputs :
27- issue_timestamp : ${{ steps.get_issue_timestamp.outputs.issue_timestamp }}
26+ outputs :
27+ issue_timestamp : ${{ steps.get_issue_timestamp.outputs.issue_timestamp }}
2828 steps :
2929 - name : Checkout the repository
3030 uses : actions/checkout@v2
@@ -34,38 +34,38 @@ jobs:
3434 git fetch
3535 echo "Current Branch: $(git branch)"
3636 git checkout ${{github.event.pull_request.head.ref}}
37-
38- - name : Get Issue Timestamp
39- id : get_issue_timestamp
37+
38+ - name : Get Issue Timestamp
39+ id : get_issue_timestamp
4040 working-directory : roiScript
41- run : | # timestamp: Dunridge, issue #767: 2023-11-14 16:06:02
41+ run : | # timestamp: Dunridge, issue #767: 2023-11-14 16:06:02
4242 issue_timestamp=$(cat issue_timestamp.log | awk -F ': ' '{print $2}')
4343 seconds_since_epoch=$(date -d "${issue_timestamp}" +"%s")
4444 echo "Issue timestamp from the first step: ${issue_timestamp}"
4545 echo "Issue timestamp in seconds: ${seconds_since_epoch}"
4646 echo "::set-output name=issue_timestamp::${seconds_since_epoch}"
4747 echo "" > issue_timestamp.log
48-
49- - name : Commit Timestamp Removal # step + echo "" > issue_timestamp.log -- for clearing the issue_timestamp.log file so that this doesn't run on second reviewer assignment
48+
49+ - name : Commit Timestamp Removal # step + echo "" > issue_timestamp.log -- for clearing the issue_timestamp.log file so that this doesn't run on second reviewer assignment
5050 run : |
5151 git config --global user.email "[email protected] " 5252 git config --global user.name "Dunridge"
5353 git add .
5454 git commit -m "Remove issue timestamp by $GITHUB_ACTOR"
55- git push https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git
55+ git push https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git
5656
5757 calculate_time_difference :
58- needs :
58+ needs :
5959 - record_pr_timestamp
6060 - get_issue_timestamp
6161 runs-on : ubuntu-latest
62- outputs :
62+ outputs :
6363 time_diff : ${{ steps.time_difference.outputs.time_diff }}
64- env :
64+ env :
6565 pr_timestamp_input : ${{needs.record_pr_timestamp.outputs.pr_timestamp}}
6666 issue_timestamp_input : ${{needs.get_issue_timestamp.outputs.issue_timestamp}}
6767 steps :
68- - name : Calculate Time Difference
68+ - name : Calculate Time Difference
6969 id : time_difference
7070 run : |
7171 issue_timestamp=$issue_timestamp_input
7979 metric :
8080 needs : calculate_time_difference
8181 runs-on : ubuntu-latest
82- env :
82+ env :
8383 time_diff_input : ${{needs.calculate_time_difference.outputs.time_diff}}
8484 steps :
8585 - name : Checkout code
@@ -101,6 +101,6 @@ jobs:
101101 - name : Run
102102 env :
103103 GH_TOKEN : ${{ secrets.GH_TOKEN }}
104- TIME_DIFF : ${{ needs.calculate_time_difference.outputs.time_diff }}
104+ TIME_DIFF : ${{ needs.calculate_time_difference.outputs.time_diff }}
105105 PR_NUMBER : ${{ github.event.number }}
106106 run : node ./roiScript/issue-metrics.mjs
0 commit comments