[fix] 年度別に支出の選択欄を選べるように変更 #116
Workflow file for this run
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
name: Automatically labeling pull request. | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
auto-labeling-pr: | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
# ラベル名を取得する | |
- name: Get label name | |
id: label_name | |
run: | | |
branch_type=$(echo ${{github.head_ref}} | cut -d "/" -f1) | |
if [ $branch_type == 'feature' ]; then | |
label_name=$(echo "enhancement") | |
elif [ $branch_type == 'fix' ] || [ $branch_type == 'hotfix' ]; then | |
label_name=$(echo "bug") | |
else | |
label_name="" | |
fi | |
echo "::set-output name=label_name::$label_name" | |
# PRにラベルを付与する | |
- name: Auto labeling | |
if: ${{ steps.label_name.outputs.label_name }} | |
run: | | |
number=$(echo $GITHUB_REF | sed -e 's/[^0-9]//g') | |
gh pr edit $number --add-label ${{ steps.label_name.outputs.label_name }} |